<div dir="ltr">Hi Ivan,<div>this sounds very interesting.</div><div><br></div><div>Your map has a size of 4312*5576 pixel? That's about 100MB in case of a type integer or type float map or about 200MB in case of a type double map. You must have a very fast HD or SSD to read and write such a map in under 2/3 seconds?</div>
<div><br></div><div>In case your moving window has a size of 501 pixel (not 501x501 pixel!), the amount of operations that must be performed is at least 4312*5576*501. That's about 12 billion ops. Amazing to do this in 2/3 seconds.</div>
<div>I have written a little program to see how my Intel core i5 performs processing this amount of operations. Well it needs about 100 seconds.</div><div><br></div><div>Here the code, compiled with optimization:</div><div>
<br></div><div><div>#include <stdio.h></div><div><br></div><div>int main()</div><div>{</div><div> unsigned int i, j, k;</div><div> register double v = 0.0;</div><div><br></div><div> for(i = 0; i < 4321; i++) {</div>
<div> for(j = 0; j < 5576; j++) {</div><div> for(k = 0; k < 501; k++) {</div><div> v = v + (double)(i + j + k)/3.0;</div><div> }</div>
<div> }</div><div> }</div><div> printf("v is %g\n", v);</div><div>}</div></div><div><br></div><div><div>soeren@vostro:~/src$ gcc -O3 numtest.c -o numtest</div><div>soeren@vostro:~/src$ time ./numtest </div>
<div>v is 2.09131e+13</div><div><br></div><div>real<span class="" style="white-space:pre"> </span>1m49.292s</div><div>user<span class="" style="white-space:pre"> </span>1m49.223s</div><div>sys<span class="" style="white-space:pre"> </span>0m0.000s</div>
</div><div><br></div><div><br></div><div>Your proprietary software must run highly parallel using a fast GPU or an ASIC to keep the processing time under 2/3 seconds? <br></div><div><br></div><div>Unfortunately r.neighbors is not able to compete with such a powerful software, since it is not reading the entire map into RAM and does not run on GPU's or ASIC's. But r.neighbors is able to process maps that are to large to fit into the RAM. :)</div>
<div><br></div><div>Can you please tell us what software is so incredible fast?</div><div><br></div><div>Best regards</div><div>Soeren </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/28 Ivan Marchesini <span dir="ltr"><<a href="mailto:ivan.marchesini@gmail.com" target="_blank">ivan.marchesini@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Markus<br>
you are perfectly right<br>
<br>
the region is 4312*5576<br>
the moving window 501<br>
GRASS is the stable version on a machine with 8 core and 32 gb RAM.<br>
Ubuntu 12.04<br>
<br>
it seems that the proprietary software is able to perform the analysis<br>
in 2/3 seconds<br>
<br>
:-|<br>
<br>
ciao<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, 2013-06-28 at 00:02 +0200, Markus Neteler wrote:<br>
> On Thu, Jun 27, 2013 at 9:01 AM, Ivan Marchesini<br>
> <<a href="mailto:ivan.marchesini@gmail.com">ivan.marchesini@gmail.com</a>> wrote:<br>
> > Hi all,<br>
> > A friend of mine (having skill also in some proprietary remote sensing<br>
> > softwares) is testing GRASS for some task.<br>
> > He is quite happy about the results but he was really surprised by the<br>
> > time interval that r.neighbor take for doing the analysis. The time is<br>
> > really large in his opinion<br>
><br>
> Please post some indications: computational region size and<br>
> moving window size, also which hardware/operating system.<br>
> Otherwise it is hard to say anything...<br>
><br>
> Markus<br>
<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div></div></blockquote></div><br></div>