ITK  6.0.0
Insight Toolkit
itkTBBMultiThreader.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef itkTBBMultiThreader_h
20 #define itkTBBMultiThreader_h
21 
22 #include "itkMultiThreaderBase.h"
23 
24 namespace itk
25 {
38 class ITKCommon_EXPORT TBBMultiThreader : public MultiThreaderBase
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_MOVE(TBBMultiThreader);
42 
48 
50  itkNewMacro(Self);
51 
53  itkOverrideGetNameOfClassMacro(TBBMultiThreader);
54 
58  void
59  SetNumberOfWorkUnits(ThreadIdType numberOfWorkUnits) override;
60 
65  void
66  SingleMethodExecute() override;
67 
72  void
73  SetSingleMethod(ThreadFunctionType, void * data) override;
74 
77  void
78  ParallelizeArray(SizeValueType firstIndex,
79  SizeValueType lastIndexPlus1,
81  ProcessObject * filter) override;
82 
84  void
85  ParallelizeImageRegion(unsigned int dimension,
86  const IndexValueType index[],
87  const SizeValueType size[],
89  ProcessObject * filter) override;
90 
91 protected:
93  ~TBBMultiThreader() override;
94  void
95  PrintSelf(std::ostream & os, Indent indent) const override;
96 
97 private:
99  friend class ProcessObject;
100 };
101 
102 } // end namespace itk
103 #endif
itk::MultiThreaderBase
A class for performing multithreaded execution.
Definition: itkMultiThreaderBase.h:107
itk::TBBMultiThreader
A class for performing multithreaded execution with a thread pool back end, uses the Intel Threading ...
Definition: itkTBBMultiThreader.h:38
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ThreadFunctionType
void(*)(void *) ThreadFunctionType
Definition: itkThreadSupport.h:82
itk::IndexValueType
long IndexValueType
Definition: itkIntTypes.h:93
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:102
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkMultiThreaderBase.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::MultiThreaderBase::ThreadingFunctorType
std::function< void(const IndexValueType index[], const SizeValueType size[])> ThreadingFunctorType
Definition: itkMultiThreaderBase.h:333
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:86
itk::MultiThreaderBase::ArrayThreadingFunctorType
std::function< void(SizeValueType)> ArrayThreadingFunctorType
Definition: itkMultiThreaderBase.h:334