Hi All
Some vague navel-gazing follows, please bear with me....
I've recently encountered OpenMP, and wondered if there's any activity within Boost
to exploit this. Although OpenMP is new to me I appreciate it's been around a while,
so apologies in advance if this is all old hat!
In a nutshell as I understand it OpenMP is an open standard for explicity directing the compiler
to exploit potential parallelism in the code by embedding #pragmas when statements or
loops can be parallelised, and specifying in the pragma which variables are common and
which are per execution path. The compiler then sorts out threads and locking etc. We have
seen some dramatic performance gains using OpenMP.
Ok, some (possibly very naive) thoughts
- In some ways this is an alternative to Boost thread pools.
- Using explicit pragmas is an intermediate step, and ultimately it might be hoped that a
compiler would be able to do all this without external direction.
- The whole OpenMP notion is too specific for a general library like Boost
It occurs to me that there might be benefit in parallelised standard algorithms (for_each,
find, etc), although these might have slightly different behaviour to the existing single thread
versions. For example, find() would find any occurance of a value, not necessarily the
first.
Has any work been done in this area, and would it be of interest to anyone? Are there any
known show-stoppers that blow the whole notion out of the water?
Thanks for listening,
- Rob.