0

I want to use OpenMP with iterator pattern. But it says syntax error. Is there some way to get this run with iterator pattern? Don't want to work with indexes.

#pragma omp parallel 
{
#pragma omp for 
for (Food * thisFood : food){
...
}
}
3
  • 2
    Not really but somehow. stackoverflow.com/questions/17848521/… Commented Mar 24, 2014 at 12:01
  • 1
    @Pixelchemist the post you mention use the task construct, and I agree that it do it! but for the for construct even OpenMP v4 is limited to the old C++98 feature, so the new C++11 for (iterator pattern) will not be distribute among multiple thread read more Commented Mar 25, 2014 at 10:33
  • 1
    @alexbuisson That's what I mean by "not really". Commented Mar 25, 2014 at 15:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.