[GRASS-SVN] r32243 - grass/branches/develbranch_6/raster/r.cost
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 24 02:32:34 EDT 2008
Author: martinl
Date: 2008-07-24 02:32:33 -0400 (Thu, 24 Jul 2008)
New Revision: 32243
Modified:
grass/branches/develbranch_6/raster/r.cost/main.c
Log:
Fix calculation of number of segments (round up instead of down) [merged from trunk, r32239]
Modified: grass/branches/develbranch_6/raster/r.cost/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.cost/main.c 2008-07-24 04:05:48 UTC (rev 32242)
+++ grass/branches/develbranch_6/raster/r.cost/main.c 2008-07-24 06:32:33 UTC (rev 32243)
@@ -357,7 +357,7 @@
srows = scols = SEGCOLSIZE;
if (maxmem > 0)
segments_in_memory =
- 2 + maxmem * (nrows / SEGCOLSIZE) * (ncols / SEGCOLSIZE) / 100;
+ 2 + maxmem * (1 + nrows / SEGCOLSIZE) * (1 + ncols / SEGCOLSIZE) / 100;
else
segments_in_memory = 4 * (nrows / SEGCOLSIZE + ncols / SEGCOLSIZE + 2);
More information about the grass-commit
mailing list