Hi folks
I've been considering writing some of my first multiprocessing code and I'm
lookiing at using OpenMP. Having browsed some parts of the spec it seems
that OpenMP doesn't have much to say about communicating between running
threads, although it does have facilities for handing data to a new thread and
getting data out of a thread that has completed its run.
My application has a highly parallelisable subproblem which requires some
communication between the threads and a master while running each instance
of the subproblem. Perhaps more importantly, this subproblem may need to be
solved many many times during an execution of the program. It seems wasteful
to have to set up and tear down the many threads needed for the subproblem.
I'd rather set them up once and then hand them a batch of work to complete,
then leave them waiting on a mutex or something until there's another batch of
work to do.
C++11 has things called promises and futures which are intended to be used mainly
for inter-thread communications. Promises and futures may be suitable for getting
data between threads in my application.
Does anybody know whether C++11 promises and futures play nice with OpenMP?
FWIW, I'd most likely be using GCC 4.7, so OpenMP 3.1 features would be available.
Regards, Nontagonist.
