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){
...
}
}
@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
forconstruct 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