[gdal-dev] [NEW] Multi-threaded warping

Even Rouault even.rouault at mines-paris.org
Mon Jun 11 12:54:19 PDT 2012


Le lundi 11 juin 2012 00:22:36, Etienne Tourigny a écrit :
> Even - good stuff!
> 
> Can you comment on the usage of openmp for multi-threading?  Is the
> multi-threading in gdal entirely based on pthreads (in linux)?

Yes, using the mutex, condition and thread API in cpl_multiproc.h that mimics 
pthreads. On Unix, there is almost a 1-1 mapping with pthread semantics (the 
main difference is that CPLCreateMutex() also takes the mutex). On Windows, 
pthread semantics is emulated using matching functions of the Windows API.

> 
> It's my understanding that openmp is much easier to manage but offers
> less fine-grained control - is that required for multi-thread warping?

I'm pretty much convinced that it could be written with OpenMP too, and my 
quick looking at its capabilities show that it should offer sufficient control. 
It is just that I'm not familiar enough with OpenMP. And, on a personal plan 
(others are free to disagree), I also prefer the explicit verbosity of 
threading API, rather than OpenMP directives.


More information about the gdal-dev mailing list