31 #ifndef vtkSMPTools_h__
32 #define vtkSMPTools_h__
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 typedef char (&no_type)[1];
53 typedef char (&yes_type)[2];
54 template <
typename U,
void (U::*)()>
struct V {};
55 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
56 template <
typename U>
static no_type check(...);
58 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
64 typedef char (&no_type)[1];
65 typedef char (&yes_type)[2];
66 template <
typename U,
void (U::*)() const>
struct V {};
67 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
68 template <
typename U>
static no_type check(...);
70 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
73 template <
typename Functor,
bool Init>
76 template <
typename Functor>
95 template <
typename Functor>
103 unsigned char& inited = this->Initialized.
Local();
106 this->F.Initialize();
109 this->F(first, last);
122 template <
typename Functor>
130 template <
typename Functor>
141 #endif // DOXYGEN_SHOULD_SKIP_THIS
154 template <
typename Functor>
158 fi.For(first, last, grain);
169 template <
typename Functor>
173 fi.For(first, last, grain);
184 template <
typename Functor>
198 template <
typename Functor>
212 static void Initialize(
int numThreads=0);
219 static int GetEstimatedNumberOfThreads();
#define VTKCOMMONCORE_EXPORT
static void vtkSMPTools_Impl_For(vtkIdType first, vtkIdType last, vtkIdType grain, FunctorInternal &fi)