4 #ifndef vtkSMPToolsImpl_h
5 #define vtkSMPToolsImpl_h
7 #include "vtkCommonCoreModule.h"
13 #define VTK_SMP_MAX_BACKENDS_NB 4
15 #define VTK_SMP_BACKEND_SEQUENTIAL 0
16 #define VTK_SMP_BACKEND_STDTHREAD 1
17 #define VTK_SMP_BACKEND_TBB 2
18 #define VTK_SMP_BACKEND_OPENMP 3
26 VTK_ABI_NAMESPACE_BEGIN
35 #if VTK_SMP_DEFAULT_IMPLEMENTATION_SEQUENTIAL
37 #elif VTK_SMP_DEFAULT_IMPLEMENTATION_STDTHREAD
39 #elif VTK_SMP_DEFAULT_IMPLEMENTATION_TBB
41 #elif VTK_SMP_DEFAULT_IMPLEMENTATION_OPENMP
45 template <BackendType Backend>
68 template <
typename FunctorInternal>
72 template <
typename InputIt,
typename OutputIt,
typename Functor>
73 void Transform(InputIt inBegin, InputIt inEnd, OutputIt outBegin, Functor transform);
76 template <
typename InputIt1,
typename InputIt2,
typename OutputIt,
typename Functor>
78 InputIt1 inBegin1, InputIt1 inEnd, InputIt2 inBegin2, OutputIt outBegin, Functor transform);
81 template <
typename Iterator,
typename T>
82 void Fill(Iterator begin, Iterator end,
const T&
value);
85 template <
typename RandomAccessIterator>
86 void Sort(RandomAccessIterator begin, RandomAccessIterator end);
89 template <
typename RandomAccessIterator,
typename Compare>
90 void Sort(RandomAccessIterator begin, RandomAccessIterator end, Compare comp);
94 : NestedActivated(true)
101 : NestedActivated(other.NestedActivated)
102 , IsParallel(other.IsParallel.
load())
109 this->NestedActivated = other.NestedActivated;
110 this->IsParallel = other.IsParallel.load();
114 bool NestedActivated =
false;
115 std::atomic<bool> IsParallel{
false };
120 VTK_ABI_NAMESPACE_END
void(*)(void *, vtkIdType, vtkIdType, vtkIdType) ExecuteFunctorPtrType
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.