Legion Runtime
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Legion::PhaseBarrier Class Reference

#include <legion.h>

Inheritance diagram for Legion::PhaseBarrier:
Legion::DynamicCollective

Public Member Functions

bool operator< (const PhaseBarrier &rhs) const
 
bool operator== (const PhaseBarrier &rhs) const
 
bool operator!= (const PhaseBarrier &rhs) const
 
void arrive (unsigned count=1)
 
void wait (void)
 
void alter_arrival_count (int delta)
 
Realm::Barrier get_barrier (void) const
 
bool exists (void) const
 

Protected Member Functions

FRIEND_ALL_RUNTIME_CLASSES PhaseBarrier (Internal::ApBarrier b)
 

Protected Attributes

Internal::ApBarrier phase_barrier
 

Detailed Description

Phase barriers are a synchronization mechanism for use with regions acquired with simultaneous coherence in a deferred execution model. Phase barriers allow the application to guarantee that a collection of tasks are all executing their sub-tasks all within the same phase of computation. Phase barriers are light-weight handles that can be passed by value or stored in data structures. Phase barriers are made in a parent task and can be passed down to any sub-tasks. However, phase barriers should not escape the context in which they were created as the task that created them will garbage collect their resources.

Note that there are two ways to use phase barriers. The first is to use the blocking operations to wait for a phase to begin and to indicate that the task has arrived at the current phase. These operations may stall and block current task execution. The preferred method for using phase barriers is to pass them in as wait and arrive barriers for launcher objects which will perform the necessary operations on barriers before an after the operation is executed.

See also
TaskLauncher
IndexTaskLauncher
CopyLauncher
InlineLauncher
Runtime

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