ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Protected Member Functions | List of all members
itk::ThreadedDomainPartitioner< TDomain > Class Template Referenceabstract

#include <itkThreadedDomainPartitioner.h>

Detailed Description

template<typename TDomain>
class itk::ThreadedDomainPartitioner< TDomain >

Virtual base class for partitioning a domain into subsets to be processed per thread when parallel processing.

Template Parameters
TDomainThe type of the domain to be partitioned.

PartitionDomain is a method to split the domain into non-overlapping pieces for threading. It must be overridden by derived classes to provide the particular functionality required for TDomain type.

Subclasses of this class are typically used as template arguments to a DomainThreader.

See also
DomainThreader

Definition at line 47 of file itkThreadedDomainPartitioner.h.

+ Inheritance diagram for itk::ThreadedDomainPartitioner< TDomain >:
+ Collaboration diagram for itk::ThreadedDomainPartitioner< TDomain >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using DomainType = TDomain
 
using Pointer = SmartPointer< Self >
 
using Self = ThreadedDomainPartitioner
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

const char * GetNameOfClass () const override
 
virtual ThreadIdType PartitionDomain (const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType &completeDomain, DomainType &subDomain) const =0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

 ThreadedDomainPartitioner ()=default
 
 ~ThreadedDomainPartitioner () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

template<typename TDomain>
using itk::ThreadedDomainPartitioner< TDomain >::ConstPointer = SmartPointer<const Self>

Definition at line 56 of file itkThreadedDomainPartitioner.h.

◆ DomainType

template<typename TDomain>
using itk::ThreadedDomainPartitioner< TDomain >::DomainType = TDomain

Type of the input object that's split for threading

Definition at line 62 of file itkThreadedDomainPartitioner.h.

◆ Pointer

template<typename TDomain>
using itk::ThreadedDomainPartitioner< TDomain >::Pointer = SmartPointer<Self>

Definition at line 55 of file itkThreadedDomainPartitioner.h.

◆ Self

template<typename TDomain>
using itk::ThreadedDomainPartitioner< TDomain >::Self = ThreadedDomainPartitioner

Standard class type aliases.

Definition at line 53 of file itkThreadedDomainPartitioner.h.

◆ Superclass

template<typename TDomain>
using itk::ThreadedDomainPartitioner< TDomain >::Superclass = Object

Definition at line 54 of file itkThreadedDomainPartitioner.h.

Constructor & Destructor Documentation

◆ ThreadedDomainPartitioner()

template<typename TDomain>
itk::ThreadedDomainPartitioner< TDomain >::ThreadedDomainPartitioner ( )
protecteddefault

◆ ~ThreadedDomainPartitioner()

template<typename TDomain>
itk::ThreadedDomainPartitioner< TDomain >::~ThreadedDomainPartitioner ( )
overrideprotecteddefault

Member Function Documentation

◆ GetNameOfClass()

template<typename TDomain>
const char* itk::ThreadedDomainPartitioner< TDomain >::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::Object.

◆ PartitionDomain()

template<typename TDomain>
virtual ThreadIdType itk::ThreadedDomainPartitioner< TDomain >::PartitionDomain ( const ThreadIdType  threadId,
const ThreadIdType  requestedTotal,
const DomainType completeDomain,
DomainType subDomain 
) const
pure virtual

Split the domain completeDomain into up to requestedTotal non-overlapping subdomains, setting subdomain number threadId as subDomain and returning the total number of subdomains actually available.

Subdomains may represent an image region, or a index range for a parameter array, etc, depending on the type of object over which this class is templated.

This method should be called repeatedly for each value of threadId, from 0 up to the return value (which is always less than or equal to requestedTotal).

Implemented in itk::ThreadedImageRegionPartitioner< VDimension >, and itk::ThreadedIteratorRangePartitioner< TIterator >.


The documentation for this class was generated from the following file: