[GRASS-dev] G_put_raster_row and OpenMP

Yann yann.chemin at gmail.com
Mon Dec 3 01:38:31 EST 2007

On Friday 30 November 2007 12:13:09 Glynn Clements wrote:

> I don't know if it's "major", but one thing to bear in mind is that
> the map must have been opened with G_open_cell_new_random() in order
> to be able to use that function.

OK, this is noted, it means I have to create a function to open a floating 
point cell: G_open_fp_cell_new_random(). 

In opencell.c, G_open_cell_new_random() returns a call to 
G__open_raster_new(name, type of Open). Where is this function located 
please, and does it need modification in this case? 

> This has several consequences: the map is stored uncompressed, it
> cannot contain nulls, and it cannot be floating-point (essentially,
> when FP and null values were added in 5.x, the random-access case
> wasn't upgraded).
> Neither of these factors would be particularly hard to change.

Could you direct me a bit on changing those? 

> The raster file contains a table of row pointers, so the rows don't
> actually have to be stored in sequence in the file, even if they're
> compressed. They could be written out in an arbitrary order (although
> not concurrently).
> The null bitmap isn't compressed, so it would be possible to write out
> rows in an arbitrary order, or even concurrently. The existing code
> can't handle this because it caches a block of consecutive rows and
> writes them all out at once. Changing this would introduce
> inefficiency, as the null file is opened and closed for each write (to
> avoid doubling the number of open file descriptors).

Thank you,

Yann Chemin
International Rice Research Institute
Los Banos, Laguna
The Philippines 

More information about the grass-dev mailing list