28 #ifndef __vtkSMPTools_h__
29 #define __vtkSMPTools_h__
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
51 typedef char (&no_type)[1];
52 typedef char (&yes_type)[2];
53 template <
typename U,
void (U::*)()>
struct V {};
54 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
55 template <
typename U>
static no_type check(...);
57 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
63 typedef char (&no_type)[1];
64 typedef char (&yes_type)[2];
65 template <
typename U,
void (U::*)() const>
struct V {};
66 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
67 template <
typename U>
static no_type check(...);
69 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
72 template <
typename Functor,
bool Init>
75 template <
typename Functor>
94 template <
typename Functor>
102 unsigned char& inited = this->Initialized.Local();
105 this->F.Initialize();
108 this->F(first, last);
121 template <
typename Functor>
129 template <
typename Functor>
140 #endif // DOXYGEN_SHOULD_SKIP_THIS
153 template <
typename Functor>
157 fi.For(first, last, grain);
168 template <
typename Functor>
172 fi.For(first, last, grain);
183 template <
typename Functor>
197 template <
typename Functor>
212 static void Initialize(
int numThreads=0);
#define VTKCOMMONCORE_EXPORT
static void vtkSMPTools_Impl_For(vtkIdType first, vtkIdType last, vtkIdType grain, FunctorInternal &fi)