Internal Galois functionality - Use at your own risk. More...
Namespaces | |
namespace | anonymous_namespace{ForEachTraits.h} |
namespace | anonymous_namespace{ParallelWork.h} |
namespace | anonymous_namespace{PerThreadWorkList.h} |
namespace | DeterministicImpl |
Implementation of deterministic execution. | |
namespace | LL |
Low-level, Galois-agnostic functionality. | |
namespace | MM |
Memory management functionality. | |
namespace | PerThreadFactory |
Classes | |
class | Barrier |
class | Releasable |
class | Lockable |
All objects that may be locked (nodes primarily) must inherit from Lockable. More... | |
class | LockManagerBase |
class | SimpleRuntimeContext |
struct | AlwaysLockObj |
struct | CheckedLockObj |
struct | EmptyFn |
class | DoAllWork |
struct | OrderedTraits |
class | PerBackend |
class | PerThreadStorage |
class | PerPackageStorage |
class | PerThreadWorkList |
class | PerThreadVector |
class | PerThreadDeque |
class | PerThreadList |
class | PerThreadSet |
class | PerThreadMinHeap |
class | LocalRange |
class | StandardRange |
class | TerminationDetection |
class | ThreadPool |
class | UserContextAccess |
Backdoor to allow runtime methods to access private data in UserContext. More... | |
Typedefs | |
typedef std::function< void(void)> | RunCommand |
Enumerations | |
enum | ConflictFlag { CONFLICT = -1, NO_CONFLICT = 0, REACHED_FAILSAFE = 1, BREAK = 2 } |
enum | PendingFlag { NON_DET, PENDING, COMMITTING } |
Functions | |
void | initPTS () |
Barrier & | getSystemBarrier () |
Have a pre-instantiated barrier available for use. | |
Barrier * | createSimpleBarrier () |
Creates a new simple barrier. | |
void | setPending (PendingFlag value) |
Used by deterministic and ordered executor. | |
PendingFlag | getPending () |
static void | clearConflictLock () |
used to release lock over exception path | |
static void | clearReleasable () |
SimpleRuntimeContext * | getThreadContext () |
get the current conflict detection class, may be null if not in parallel region | |
void | setThreadContext (SimpleRuntimeContext *n) |
used by the parallel code to set up conflict detection per thread | |
bool | shouldLock (const Galois::MethodFlag g) |
Helper function to decide if the conflict detection lock should be taken. | |
void | doAcquire (Lockable *lockable) |
actual locking function. Will always lock. | |
void | acquire (Lockable *lockable, Galois::MethodFlag m) |
Master function which handles conflict detection used to acquire a lockable thing. | |
void | signalConflict (Lockable *) |
void | forceAbort () |
template<typename RangeTy , typename WorkTy > | |
static void | for_each_det_impl (const RangeTy &range, WorkTy &W) |
template<typename RangeTy , typename FunctionTy , typename ReducerTy > | |
FunctionTy | do_all_dispatch (RangeTy range, FunctionTy f, ReducerTy r, bool doReduce, const char *loopname, bool steal) |
template<typename RangeTy , typename FunctionTy > | |
FunctionTy | do_all_impl (RangeTy range, FunctionTy f, const char *loopname=0, bool steal=false) |
template<typename RangeTy , typename FunctionTy , typename ReduceTy > | |
FunctionTy | do_all_impl (RangeTy range, FunctionTy f, ReduceTy r, const char *loopname=0, bool steal=false) |
void | doCheckWrite () |
bool | isWriteMethod (Galois::MethodFlag m, bool write) |
void | checkWrite (Galois::MethodFlag m, bool write) |
template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc > | |
void | for_each_ordered_impl (Iter beg, Iter end, const Cmp &cmp, const NhFunc &nhFunc, const OpFunc &opFunc, const char *loopname) |
template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc , typename StableTest > | |
void | for_each_ordered_impl (Iter beg, Iter end, const Cmp &cmp, const NhFunc &nhFunc, const OpFunc &opFunc, const StableTest &stabilityTest, const char *loopname) |
void | preAlloc_impl (int num) |
PerBackend & | getPTSBackend () |
PerBackend & | getPPSBackend () |
template<typename T > | |
LocalRange< T > | makeLocalRange (T &obj) |
template<typename IterTy > | |
StandardRange< IterTy > | makeStandardRange (IterTy begin, IterTy end) |
void | beginSampling () |
void | endSampling () |
void | beginThreadSampling () |
void | endThreadSampling () |
void | reportStat (const char *loopname, const char *category, unsigned long value) |
Reports stats for a given thread. | |
void | reportStat (const std::string &loopname, const std::string &category, unsigned long value) |
Reports stats for a given thread. | |
void | reportStat (Galois::Statistic *value) |
Reports stats for all threads. | |
void | reportPageAlloc (const char *category) |
Reports Galois system memory stats for all threads. | |
void | reportNumaAlloc (const char *category) |
Reports NUMA memory stats for all NUMA nodes. | |
void | printStats () |
Prints all stats. | |
TerminationDetection & | getSystemTermination () |
ThreadPool & | getSystemThreadPool () |
Returns or creates the appropriate thread pool for the system. | |
Variables | |
unsigned int | activeThreads = 1 |
__thread char * | ptsBase |
__thread char * | ppsBase |
bool | inGaloisForEach = false |
Internal Galois functionality - Use at your own risk.
typedef std::function<void (void)> Galois::Runtime::RunCommand |
void Galois::Runtime::acquire | ( | Lockable * | lockable, | |
Galois::MethodFlag | m | |||
) | [inline] |
Master function which handles conflict detection used to acquire a lockable thing.
void Galois::Runtime::beginSampling | ( | ) |
void Galois::Runtime::beginThreadSampling | ( | ) |
void Galois::Runtime::checkWrite | ( | Galois::MethodFlag | m, | |
bool | write | |||
) | [inline] |
static void Galois::Runtime::clearConflictLock | ( | ) | [inline, static] |
used to release lock over exception path
static void Galois::Runtime::clearReleasable | ( | ) | [inline, static] |
Galois::Runtime::Barrier * Galois::Runtime::createSimpleBarrier | ( | ) |
Creates a new simple barrier.
This barrier is not designed to be fast but does gaurantee that all threads have left the barrier before returning control. Useful when the number of active threads is modified to avoid a race in getSystemBarrier(). Client is reponsible for deallocating returned barrier.
FunctionTy Galois::Runtime::do_all_dispatch | ( | RangeTy | range, | |
FunctionTy | f, | |||
ReducerTy | r, | |||
bool | doReduce, | |||
const char * | loopname, | |||
bool | steal | |||
) | [inline] |
FunctionTy Galois::Runtime::do_all_impl | ( | RangeTy | range, | |
FunctionTy | f, | |||
ReduceTy | r, | |||
const char * | loopname = 0 , |
|||
bool | steal = false | |||
) | [inline] |
FunctionTy Galois::Runtime::do_all_impl | ( | RangeTy | range, | |
FunctionTy | f, | |||
const char * | loopname = 0 , |
|||
bool | steal = false | |||
) | [inline] |
void Galois::Runtime::doAcquire | ( | Lockable * | lockable | ) | [inline] |
actual locking function. Will always lock.
void Galois::Runtime::doCheckWrite | ( | ) |
void Galois::Runtime::endSampling | ( | ) |
void Galois::Runtime::endThreadSampling | ( | ) |
static void Galois::Runtime::for_each_det_impl | ( | const RangeTy & | range, | |
WorkTy & | W | |||
) | [inline, static] |
void Galois::Runtime::for_each_ordered_impl | ( | Iter | beg, | |
Iter | end, | |||
const Cmp & | cmp, | |||
const NhFunc & | nhFunc, | |||
const OpFunc & | opFunc, | |||
const StableTest & | stabilityTest, | |||
const char * | loopname | |||
) | [inline] |
void Galois::Runtime::for_each_ordered_impl | ( | Iter | beg, | |
Iter | end, | |||
const Cmp & | cmp, | |||
const NhFunc & | nhFunc, | |||
const OpFunc & | opFunc, | |||
const char * | loopname | |||
) | [inline] |
void Galois::Runtime::forceAbort | ( | ) |
Galois::Runtime::PendingFlag Galois::Runtime::getPending | ( | ) |
Galois::Runtime::PerBackend & Galois::Runtime::getPPSBackend | ( | ) |
Galois::Runtime::PerBackend & Galois::Runtime::getPTSBackend | ( | ) |
Galois::Runtime::Barrier & Galois::Runtime::getSystemBarrier | ( | ) |
Have a pre-instantiated barrier available for use.
This is initialized to the current activeThreads. This barrier is designed to be fast and should be used in the common case.
However, there is a race if the number of active threads is modified after using this barrier: some threads may still be in the barrier while the main thread reinitializes this barrier to the new number of active threads. If that may happen, use createSimpleBarrier() instead.
Galois::Runtime::TerminationDetection & Galois::Runtime::getSystemTermination | ( | ) |
ThreadPool & Galois::Runtime::getSystemThreadPool | ( | ) |
Returns or creates the appropriate thread pool for the system.
Implement the global threadpool.
Galois::Runtime::SimpleRuntimeContext * Galois::Runtime::getThreadContext | ( | ) |
get the current conflict detection class, may be null if not in parallel region
void Galois::Runtime::initPTS | ( | ) |
bool Galois::Runtime::isWriteMethod | ( | Galois::MethodFlag | m, | |
bool | write | |||
) | [inline] |
LocalRange<T> Galois::Runtime::makeLocalRange | ( | T & | obj | ) | [inline] |
StandardRange<IterTy> Galois::Runtime::makeStandardRange | ( | IterTy | begin, | |
IterTy | end | |||
) | [inline] |
void Galois::Runtime::preAlloc_impl | ( | int | num | ) |
void Galois::Runtime::printStats | ( | ) |
Prints all stats.
void Galois::Runtime::reportNumaAlloc | ( | const char * | category | ) |
Reports NUMA memory stats for all NUMA nodes.
void Galois::Runtime::reportPageAlloc | ( | const char * | category | ) |
Reports Galois system memory stats for all threads.
void Galois::Runtime::reportStat | ( | Galois::Statistic * | value | ) |
Reports stats for all threads.
void Galois::Runtime::reportStat | ( | const std::string & | loopname, | |
const std::string & | category, | |||
unsigned long | value | |||
) |
Reports stats for a given thread.
void Galois::Runtime::reportStat | ( | const char * | loopname, | |
const char * | category, | |||
unsigned long | value | |||
) |
Reports stats for a given thread.
void Galois::Runtime::setPending | ( | PendingFlag | value | ) |
Used by deterministic and ordered executor.
void Galois::Runtime::setThreadContext | ( | SimpleRuntimeContext * | n | ) |
used by the parallel code to set up conflict detection per thread
bool Galois::Runtime::shouldLock | ( | const Galois::MethodFlag | g | ) | [inline] |
Helper function to decide if the conflict detection lock should be taken.
void Galois::Runtime::signalConflict | ( | Lockable * | lockable | ) |
unsigned int Galois::Runtime::activeThreads = 1 |
bool Galois::Runtime::inGaloisForEach = false |
__thread char * Galois::Runtime::ppsBase |
__thread char * Galois::Runtime::ptsBase |