[Omp] C++ class data member privatization
Lei Huang
lhuang5 at mail.uh.edu
Thu Dec 1 11:50:14 PST 2005
Dear OpenMP experts,
I have a question regarding how to privatize a class data member in C++.
Since the member variable is in the class scope, I was wondering how a
compiler handles the case. I tried to use the private clause, but the
compiler does not allow me. My code looks like the following:
class a
{
Int m_i;
Void process()
{
#pragma omp parallel private(m_i)
……
}
}
Should I use threadprivate in this case?
Thanks for your suggestions!
Best Regards,
Sincerely
Lei Huang
University of Houston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openmp.org/pipermail/omp/attachments/20051201/727dd758/attachment.html
More information about the Omp
mailing list