#include <Termination.h>
Public Member Functions | |
virtual void | initializeThread ()=0 |
Initializes the per-thread state. | |
virtual void | localTermination (bool workHappened)=0 |
Process termination locally. | |
bool | globalTermination () const |
Returns whether global termination is detected. | |
Protected Attributes | |
LL::CacheLineStorage< volatile bool > | globalTerm |
bool Galois::Runtime::TerminationDetection::globalTermination | ( | ) | const [inline] |
Returns whether global termination is detected.
virtual void Galois::Runtime::TerminationDetection::initializeThread | ( | ) | [pure virtual] |
Initializes the per-thread state.
All threads must call this before any call localTermination.
Implemented in anonymous_namespace{Termination.cpp}::LocalTerminationDetection, and anonymous_namespace{Termination.cpp}::TreeTerminationDetection.
virtual void Galois::Runtime::TerminationDetection::localTermination | ( | bool | workHappened | ) | [pure virtual] |
Process termination locally.
May be called as often as needed. The argument workHappened signals that since last time it was called, some progress was made that should prevent termination. All threads must call initializeThread() before any thread calls this function. This function should not be on the fast path (this is why it takes a flag, to allow the caller to buffer up work status changes).
Implemented in anonymous_namespace{Termination.cpp}::LocalTerminationDetection, and anonymous_namespace{Termination.cpp}::TreeTerminationDetection.
LL::CacheLineStorage<volatile bool> Galois::Runtime::TerminationDetection::globalTerm [protected] |