35 #include "vtkCommonCoreModule.h"
38 #include "vtkSMPThreadLocal.h"
39 #include "vtkSMPToolsInternal.h"
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 typedef char (&no_type)[1];
54 typedef char (&yes_type)[2];
55 template <
typename U,
void (U::*)()>
struct V {};
56 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
57 template <
typename U>
static no_type check(...);
59 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
65 typedef char (&no_type)[1];
66 typedef char (&yes_type)[2];
67 template <
typename U,
void (U::*)() const>
struct V {};
68 template <
typename U>
static yes_type check(V<U, &U::Initialize>*);
69 template <
typename U>
static no_type check(...);
71 static bool const value =
sizeof(check<T>(0)) ==
sizeof(yes_type);
74 template <
typename Functor,
bool Init>
77 template <
typename Functor>
88 vtk::detail::smp::vtkSMPTools_Impl_For(first, last, grain, *
this);
96 template <
typename Functor>
104 unsigned char& inited = this->Initialized.Local();
107 this->F.Initialize();
110 this->F(first, last);
114 vtk::detail::smp::vtkSMPTools_Impl_For(first, last, grain, *
this);
123 template <
typename Functor>
131 template <
typename Functor>
141 #endif // __VTK_WRAP__
142 #endif // DOXYGEN_SHOULD_SKIP_THIS
158 template <
typename Functor>
162 fi.For(first, last, grain);
176 template <
typename Functor>
180 fi.For(first, last, grain);
193 template <
typename Functor>
208 template <
typename Functor>
224 static void Initialize(
int numThreads=0);
232 static int GetEstimatedNumberOfThreads();
239 template<
typename RandomAccessIterator>
240 static void Sort(RandomAccessIterator begin, RandomAccessIterator end)
242 vtk::detail::smp::vtkSMPTools_Impl_Sort(begin,end);
251 template<
typename RandomAccessIterator,
typename Compare>
252 static void Sort(RandomAccessIterator begin, RandomAccessIterator end,
255 vtk::detail::smp::vtkSMPTools_Impl_Sort(begin,end,comp);