I currently have a code (in C) with an outer loop that is OpenMP-parallelized (it operates locally on a shared-memory list). I'm rewriting it in C++, and for many things I found the BOOST_FOREACH macro a very nice syntax as loop construct for iterating over a list, array, etc.
My question is: is there a way I can both use that syntax and parallelize the loop OpenMP-style?
Copying from the terminal is worth 1 kilowords:
$ g++ a.cpp -I/opt/boost-1.45.0/include -O -fopenmp
a.cpp: In function ‘int main()’:
a.cpp:12: error: for statement expected before ‘if’
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With