lundi 5 décembre 2016

OpenMP threadprivate template variable

I want a template variable to be threadprivate as well. Could this be done ? Something like the following:

template<typename T>
struct Tpl { };

template<typename X>
extern Tpl<X> var;
#pragma omp threadprivate(var) // <<< No compiler supports this.
template<typename X>
Tpl<X> var;

Aucun commentaire:

Enregistrer un commentaire