I try to run my program in parallel using OpenMP, and sometimes I feel like I have reached a dead end.
I would like to share the variables in a member of the function that I defined (and initialized) in the class. If I understand correctly, it is impossible to make #pragma omp parallel shared(foo)data members (eg int, boost::multi_arrayand std::vector) class. for example: using push_back () for a vector data element in a class. updating values a boost::multi_array.
My question is, is OpenMP the right tool for it, or should I use boost :: thread or tbb? or something else ... what C ++ API support
Reagrds
source
share