ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkBarrier.h>
Standard barrier class implementation for synchronizing the execution of threads.
A barrier class is used to synchronize threaded execution by allowing threads to block until each has reached a desired state. As each thread enters the barrier it blocks. When all threads have entered the barrier, all released and continue to execute.
A thread enters the barrier by calling Wait() on the barrier class. To set up a barrier class, call Initialize(n) where n is the number of waiting threads that will trigger a release of the barrier.
Definition at line 41 of file itkBarrier.h.
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Barrier | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
void | Initialize (unsigned int) |
void | Wait () |
Public Member Functions inherited from itk::LightObject | |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
itkCloneMacro (Self) | |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Private Member Functions | |
Barrier () | |
~Barrier () | |
Private Attributes | |
ConditionVariable::Pointer | m_ConditionVariable |
SimpleMutexLock | m_Mutex |
unsigned int | m_NumberArrived |
unsigned int | m_NumberExpected |
Additional Inherited Members | |
Protected Types inherited from itk::LightObject | |
typedef int | InternalReferenceCountType |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes inherited from itk::LightObject | |
InternalReferenceCountType | m_ReferenceCount |
SimpleFastMutexLock | m_ReferenceCountLock |
typedef SmartPointer< const Self > itk::Barrier::ConstPointer |
Definition at line 50 of file itkBarrier.h.
typedef SmartPointer< Self > itk::Barrier::Pointer |
Definition at line 49 of file itkBarrier.h.
typedef Barrier itk::Barrier::Self |
Standard class typedefs.
Definition at line 47 of file itkBarrier.h.
typedef LightObject itk::Barrier::Superclass |
Definition at line 48 of file itkBarrier.h.
|
private |
|
private |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::LightObject.
void itk::Barrier::Initialize | ( | unsigned | int | ) |
Creates a new system variable used to implement the barrier. The argument to this method is the number of threads that must Wait() on the barrier before it is cleared.
|
static |
Method for creation through the object factory.
Referenced by itk::NarrowBandImageFilterBase< TInputImage, Image< TOutputPixelType, TInputImage::ImageDimension > >::NarrowBandImageFilterBase().
void itk::Barrier::Wait | ( | ) |
|
private |
Definition at line 72 of file itkBarrier.h.
|
private |
Definition at line 74 of file itkBarrier.h.
|
private |
Definition at line 73 of file itkBarrier.h.
|
private |
Definition at line 76 of file itkBarrier.h.