29 #include "vtkCommonCoreModule.h" 32 #include "vtkSMPThreadLocal.h" 33 #include "vtkSMPToolsInternal.h" 36 #ifndef DOXYGEN_SHOULD_SKIP_THIS 47 typedef char (&no_type)[1];
48 typedef char (&yes_type)[2];
49 template <
typename U,
void (U::*)()>
struct V {};
50 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
51 template <
typename U>
static no_type check(...);
53 static bool const value =
sizeof(check<T>(
nullptr)) ==
sizeof(yes_type);
59 typedef char (&no_type)[1];
60 typedef char (&yes_type)[2];
61 template <
typename U,
void (U::*)() const>
struct V {};
62 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
63 template <
typename U>
static no_type check(...);
65 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
68 template <
typename Functor,
bool Init>
71 template <
typename Functor>
82 vtk::detail::smp::vtkSMPTools_Impl_For(first, last, grain, *
this);
90 template <
typename Functor>
98 unsigned char& inited = this->Initialized.Local();
101 this->F.Initialize();
104 this->F(first, last);
108 vtk::detail::smp::vtkSMPTools_Impl_For(first, last, grain, *
this);
117 template <
typename Functor>
125 template <
typename Functor>
135 #endif // __VTK_WRAP__ 136 #endif // DOXYGEN_SHOULD_SKIP_THIS 152 template <
typename Functor>
156 fi.For(first, last, grain);
170 template <
typename Functor>
174 fi.For(first, last, grain);
187 template <
typename Functor>
202 template <
typename Functor>
218 static void Initialize(
int numThreads=0);
226 static int GetEstimatedNumberOfThreads();
233 template<
typename RandomAccessIterator>
234 static void Sort(RandomAccessIterator begin, RandomAccessIterator end)
236 vtk::detail::smp::vtkSMPTools_Impl_Sort(begin,end);
245 template<
typename RandomAccessIterator,
typename Compare>
246 static void Sort(RandomAccessIterator begin, RandomAccessIterator end,
249 vtk::detail::smp::vtkSMPTools_Impl_Sort(begin,end,comp);