OpenMP class member variable privatisation

General OpenMP discussion

OpenMP class member variable privatisation

Postby swatimital » Mon Aug 04, 2008 4:38 am


I am new to OpenMP and I discovered today that there is no real way to perform class member variable privatization under OpenMP. So, if you have some code like-

class A
int m_var;

void foo()
#pragma omp parallel private (m_var)


This is not allowed and I think it sucks to not have any way to reference class-scoped variables and let the compiler know about them. I am using Intel's OpenMP implementation. Any suggestions?


Re: OpenMP class member variable privatisation

Postby ejd » Tue Aug 05, 2008 5:23 am

Currently OpenMP only deals with variables and not class member variables. It has to do with how and when class member variables are instantiated. Sometime in the future this might be re-examined, but for now it is a limitation.
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 2 guests