c++ - OpenMP and STL-style for -


i'm trying parallelize program openmp. program using stl-iterators heavily. said openmp 3.0 can deal this:

std::vector<int> n(2*n_max+1);  std::vector<int>::const_iterator n,m; #pragma omp parallel for (n=n.begin(); n!=n.end(); ++n){      //task in parallel }; 

but got following error:

error: invalid controlling predicate 

i'm using gcc 4.5.0, (openmp3 implemented in 4.4.0) , build string is:

g++  -o0 -g3 -wall -c -fmessage-length=0 -fopenmp -mmd -mp   

standard openmp doesn't bear c++ iterators in general. standard requires iterators random access iterators constant time random access. permits < , <= or > , >= in test expressions of loops, not !=.

if using iterators , stl heavily, might better off thread building blocks.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -