[Omp] Can I Reverse the order of the threads in the for loop?
Alchemist
my at daedalus.plus.com
Sat Jun 4 20:20:07 PDT 2005
Hi ,
Can I reverse the order (or change generally the order) in which the threads are running in the FOR loop ? For example instead of having the threads running at the normal order 0,1,2...n-1, to run at n-1, n-2, ...,1, 0 "reverse" order.
The reason why I am asking that question is that I want to build a program that dynamically changes the chunksize depending at the amount of objects on screen (more objects -> more calculations).
If I want for example to give the "whole for loop" to one thread I will have to set the chunk_size equal to the amount of iterations in the for loop, but the problem is that the for loop will be assigned to the first running thread, if I want to assign it to the last one, what should I do?
--
Best regards,
Emmanouil Hatjissavvas mailto:my at daedalus.plus.com
More information about the Omp
mailing list