Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::Barrier Class Reference

Standard barrier class implementation for synchronizing the execution of threads. More...

#include <itkBarrier.h>

Inheritance diagram for itk::Barrier:

Inheritance graph
[legend]
Collaboration diagram for itk::Barrier:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Barrier Self
typedef LightObject Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer

Public Member Functions

virtual const char * GetNameOfClass () const
void Initialize (unsigned int)
void Wait ()

Static Public Member Functions

Pointer New ()

Detailed Description

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 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.

NOTE FOR SGI USERS. You may optionally enable a fetchop library
implementation of barriers that will give significantly faster performance over the sproc barrier class. With the fetchop implementation, you are limited to Barrier::m_MaxBarriers separate barrier instantiations, although this limit can be safely raised if necessary. To enable the fetchop implementation, set ITK_USE_FETCHOP_BARRIERS and link applications against -lfetchop.

Definition at line 62 of file itkBarrier.h.


Member Typedef Documentation

typedef SmartPointer<const Self> itk::Barrier::ConstPointer
 

Reimplemented from itk::LightObject.

Definition at line 70 of file itkBarrier.h.

typedef SmartPointer<Self> itk::Barrier::Pointer
 

Reimplemented from itk::LightObject.

Definition at line 69 of file itkBarrier.h.

Referenced by itk::IsoContourDistanceImageFilter< TInputImage, TOutputImage >::~IsoContourDistanceImageFilter().

typedef Barrier itk::Barrier::Self
 

Standard class typedefs.

Reimplemented from itk::LightObject.

Definition at line 67 of file itkBarrier.h.

typedef LightObject itk::Barrier::Superclass
 

Definition at line 68 of file itkBarrier.h.


Member Function Documentation

virtual const char* itk::Barrier::GetNameOfClass  )  const [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.

Pointer itk::Barrier::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::LightObject.

void itk::Barrier::Wait  ) 
 

A thread calling this method waits until m_NumberOfThreads have called Wait() on the barrier. When the final expected thread calls Wait(), all threads are released.


The documentation for this class was generated from the following file:
Generated at Thu May 25 00:23:37 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000