Jordan Neumeyer wrote: > Just kind of my thought process about how I would try to go about > parallelizing a module.
The main issue with parallelising raster input is that the library keeps a copy of the current row's data, so that consecutive reads of the same row (as happen when upsampling) don't re-read the data. For concurrent access to a single map, you would need to either keep one row per thread, or abandon caching. Also, you would need to use pread() rather than fseek()+read(). It's more straightfoward to read multiple maps concurrently. In 7.0, this case should be thread-safe. Alternatively, you could have one thread for reading, one for writing, and multiple worker threads for the actual processing. However, unless the processing is complex, I/O will be the bottleneck. -- Glynn Clements <[email protected]> _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
