31 #ifndef vtkSMPTools_h__
32 #define vtkSMPTools_h__
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 typedef char (&no_type)[1];
55 typedef char (&yes_type)[2];
56 template <
typename U,
void (U::*)()>
struct V {};
57 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
58 template <
typename U>
static no_type check(...);
60 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
66 typedef char (&no_type)[1];
67 typedef char (&yes_type)[2];
68 template <
typename U,
void (U::*)() const>
struct V {};
69 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
70 template <
typename U>
static no_type check(...);
72 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
75 template <
typename Functor,
bool Init>
78 template <
typename Functor>
97 template <
typename Functor>
105 unsigned char& inited = this->Initialized.
Local();
108 this->F.Initialize();
111 this->F(first, last);
124 template <
typename Functor>
132 template <
typename Functor>
143 #endif // DOXYGEN_SHOULD_SKIP_THIS
156 template <
typename Functor>
160 fi.For(first, last, grain);
171 template <
typename Functor>
175 fi.For(first, last, grain);
186 template <
typename Functor>
200 template <
typename Functor>
214 static void Initialize(
int numThreads=0);
221 static int GetEstimatedNumberOfThreads();
#define VTKCOMMONCORE_EXPORT
static void vtkSMPTools_Impl_For(vtkIdType first, vtkIdType last, vtkIdType grain, FunctorInternal &fi)