[Omp] C do-while loops in openmp

kees omekeesje at wanadoo.nl
Mon Nov 13 13:25:06 PST 2006


Hello everybody,
I am just beginning to program (or better, to change some existing 
programs) using
openmp parallelization in C.
As far as for-loops are concerned, this gives me no problems.
But the kind of the programs I aim to parallelize is such that they 
involve a lot of (big)
do-while or while-do loops and far less for loops.
So to reap the real benefits of parellel-processing, I absolutely have 
to parallelize
those do-while/while-do loops.
On reading the documentation of openmp, I came to the conclusion (I hope you
can put me wrong) that this is only possible by changing the total 
structure of
my programs and somehow not using those loops anymore, which is is about
the same as a complete rewriting, and in this case, out of the question.
Now I come to my questions:
Is there an elegant and concise way to parallelize C while-do/do-while 
loops?
Can anybody give me a hint how this is to be done?
Greetings,
Kees de jong




More information about the Omp mailing list