[Omp] static variables question

Tim Prince n8tm at aol.com
Sun Jan 7 16:29:10 PST 2007


Klaas.Vantournhout at UGent.be wrote:
> 
> I have a question regarding static variables which are declared in 
> routines.
> 
> 
> What I am thinking about are recursive functions which use static 
> variables to obtain a meaningful result.  
Any variable which has a value belonging to the current scope of a 
recursive function must be automatic, regardless of openmp.  I'm having 
difficulty imagining how a recursive function would be employed in 
openmp, other than within task sharing, with each thread having its own 
data (presumably thread private).


More information about the Omp mailing list