Hi,
I have a scenario like the following:
//class somemethod contains the member variables(declaration) val1 and val2,
//and is defined in somemethod.h.
#include <somemethod.h>
void abovefunction(x)
{
//code that could be made parallel if val1 and val2 is declared private()
}
//abovefunction() is in somemethod.cpp, where the methods of class somemethod
//are described
The function is later called by some object like obj.abovefunction(x). Since val1 and val2 are declared/initialized in somemethod.h, so I cannot use them as private (val1, val2), and something like private (this->val1, this->val2) is also not possible. Can anyone please let me know the best way to parallelize using OpenMP in cases like this where the variable is a part of class and declared not in the immediate scope of the code block where OpenMP pragmas are applied ?
I have asked the same question on the OpenMP forum - http://openmp.org/forum/viewtopic.php?f=3&t=886#p3516
Thanks,
Sayan