ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTBBMultiThreader.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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_ASSIGN(TBBMultiThreader);
42 
48 
50  itkNewMacro(Self);
51 
53  itkTypeMacro(TBBMultiThreader, MultiThreaderBase);
54 
58  virtual void SetNumberOfWorkUnits( ThreadIdType numberOfWorkUnits ) override;
59 
64  void SingleMethodExecute() override;
65 
70  void SetSingleMethod(ThreadFunctionType, void *data) override;
71 
74  void ParallelizeArray(
75  SizeValueType firstIndex,
76  SizeValueType lastIndexPlus1,
78  ProcessObject* filter ) override;
79 
81  void ParallelizeImageRegion(
82  unsigned int dimension,
83  const IndexValueType index[],
84  const SizeValueType size[],
86  ProcessObject* filter) override;
87 
88 protected:
90  ~TBBMultiThreader() override;
91  void PrintSelf(std::ostream & os, Indent indent) const override;
92 
93 private:
95  friend class ProcessObject;
96 };
97 
98 } // end namespace itk
99 #endif
void(* ThreadFunctionType)(void *)
Light weight base class for most itk classes.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
std::function< void(SizeValueType) > ArrayThreadingFunctorType
std::function< void(const IndexValueType index[], const SizeValueType size[])> ThreadingFunctorType
signed long IndexValueType
Definition: itkIntTypes.h:90
A class for performing multithreaded execution.
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
A class for performing multithreaded execution with a thread pool back end, uses the Intel Threading ...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60