GaloisRuntime Namespace Reference

Namespaces

namespace  anonymous_namespace{PerThreadWorkList.h}
namespace  Config
namespace  DeterministicImpl
 

Implementation of deterministic execution.


namespace  HIDDEN
namespace  LL
 

Low-level, Galois-agnostic functionality.


namespace  MM
 

Memory management functionality.


namespace  WorkList

Classes

class  PthreadBarrier
class  SimpleBarrier
 Simple busy waiting barrier, not cyclic. More...
class  FastBarrier
 Busy waiting barrier biased towards getting master thread out as soon as possible. More...
class  FasterBarrier
class  MCSBarrier
class  TopoBarrier
class  Lockable
 All objects that may be locked (nodes primarily) must inherit from Lockable. More...
class  SimpleRuntimeContext
struct  AlwaysLockObj
struct  CheckedLockObj
class  ContextPool
struct  EmptyFn
class  DoAllWork
struct  ForEachTraits
class  galois_insert_bag
class  NhoodItem
class  LCorderedContext
class  PtrBasedNhoodMgr
class  MapBasedNhoodMgr
struct  UnstableSourceTest
struct  StableSourceTest
class  LCorderedExec
class  AtLoopExit
struct  OrderedTraits
struct  Initializer
class  LoopStatistics
class  LoopStatistics< false >
class  ForEachWork
struct  WOnEach
class  PerCPU< T, true >
class  PerCPU< T, false >
class  PerLevel< T, true >
class  PerLevel< T, false >
class  PerBackend
class  PerThreadStorage
class  PerPackageStorage
class  PerThreadWorkList
struct  PerThreadAllocatorFactory
class  PerThreadVector
class  PerThreadDeque
class  PerThreadList
class  PerThreadSet
class  QueuingLock< true >
class  QueuingLock< false >
class  LocalRange
class  StandardRange
class  TerminationDetection
class  ThreadPool
class  UserContextAccess
 Backdoor to allow runtime methods to access private data in UserContext. More...

Typedefs

typedef TopoBarrier GBarrier
typedef Config::function< void(void)> RunCommand

Enumerations

enum  ConflictFlag { CONFLICT = -1, REACHED_FAILSAFE = 1, BREAK = 2 }
enum  PendingFlag { NON_DET, PENDING, COMMITTING }

Functions

void initPTS ()
GBarriergetSystemBarrier ()
 Have a pre-instantiated barrier available for use.
void setPending (PendingFlag value)
 Used by deterministic and ordered executor.
PendingFlag getPending ()
static void clearConflictLock ()
 used to release lock over exception path
SimpleRuntimeContextgetThreadContext ()
 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
static bool shouldLock (Galois::MethodFlag g)
 Helper function to decide if the conflict detection lock should be taken.
void doAcquire (Lockable *C)
 actual locking function. Will always lock.
static void acquire (Lockable *C, Galois::MethodFlag m)
 Master function which handles conflict detection used to acquire a lockable thing.
void breakLoop ()
 Actually break for_each loop.
void signalConflict ()
void forceAbort ()
template<typename InitTy , typename WorkTy >
static void for_each_det_impl (InitTy &init, WorkTy &W)
template<typename IterTy , typename ComparatorTy , typename NhFunc , typename OpFunc >
static void for_each_ordered_2p (IterTy b, IterTy e, ComparatorTy comp, NhFunc f1, OpFunc f2, const char *loopname)
 Ordered set iteration using deterministic executor.
template<typename RangeTy , typename FunctionTy , typename ReducerTy >
FunctionTy do_all_impl_dispatch (RangeTy range, FunctionTy f, ReducerTy r, bool needsReduce, std::random_access_iterator_tag)
template<typename RangeTy , typename FunctionTy , typename ReducerTy >
FunctionTy do_all_impl_dispatch (RangeTy range, FunctionTy f, ReducerTy r, bool needsReduce, std::input_iterator_tag)
template<typename RangeTy , typename FunctionTy , typename ReducerTy >
FunctionTy do_all_impl (RangeTy range, FunctionTy f, ReducerTy r, bool needsReduce)
template<bool Steal, typename IterTy , typename FunctionTy >
void do_all_impl (IterTy b, IterTy e, FunctionTy f, const char *loopname=0)
 Backdoor function to enable stealing in do_all.
template<typename AI , typename Cmp , typename OperFunc , typename NhoodFunc >
void for_each_ordered_lc (AI abeg, AI aend, Cmp cmp, NhoodFunc nhoodVisitor, OperFunc operFunc, const char *loopname)
template<typename AI , typename Cmp , typename OperFunc , typename NhoodFunc , typename StableTest >
void for_each_ordered_lc (AI abeg, AI aend, Cmp cmp, NhoodFunc nhoodVisitor, OperFunc operFunc, StableTest stabilityTest, const char *loopname)
void runAllLoopExitHandlers (void)
static bool isWriteMethod (int m)
void doCheckWrite ()
static void checkWrite (int m)
template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc >
void for_each_ordered_impl (Iter beg, Iter end, Cmp cmp, NhFunc nhFunc, 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, Cmp cmp, NhFunc nhFunc, OpFunc opFunc, StableTest stabilityTest, const char *loopname)
template<typename WLTy , typename RangeTy , typename FunctionTy >
void for_each_impl (RangeTy range, FunctionTy f, const char *loopname)
template<typename FunctionTy >
void on_each_impl (FunctionTy fn, const char *loopname=0)
void preAlloc_impl (int num)
PerBackendgetPTSBackend ()
PerBackendgetPPSBackend ()
template<typename T >
LocalRange< T > makeLocalRange (T &obj)
template<typename IterTy >
StandardRange< IterTy > makeStandardRange (IterTy begin, IterTy end)
void beginSampling ()
void endSampling ()
void reportSampling (const char *loopname)
void reportStat (const char *loopname, const char *category, unsigned long value)
void reportStat (const std::string &loopname, const std::string &category, unsigned long value)
void reportStat (Galois::Statistic *value)
void printStats ()
TerminationDetectiongetSystemTermination ()
ThreadPoolgetSystemThreadPool ()
 Returns or creates the appropriate thread pool for the system.

Variables

static const bool debug = false
__thread char * ptsBase
__thread char * ppsBase
bool inGaloisForEach = false
unsigned int galoisActiveThreads = 1
 the number of active threads

Typedef Documentation

typedef Config::function<void (void)> GaloisRuntime::RunCommand

Enumeration Type Documentation

Enumerator:
CONFLICT 
REACHED_FAILSAFE 
BREAK 
Enumerator:
NON_DET 
PENDING 
COMMITTING 

Function Documentation

static void GaloisRuntime::acquire ( Lockable *  C,
Galois::MethodFlag  m 
) [inline, static]

Master function which handles conflict detection used to acquire a lockable thing.

void GaloisRuntime::beginSampling (  ) 
void GaloisRuntime::breakLoop (  ) 

Actually break for_each loop.

static void GaloisRuntime::checkWrite ( int  m  )  [inline, static]
static void GaloisRuntime::clearConflictLock (  )  [inline, static]

used to release lock over exception path

template<bool Steal, typename IterTy , typename FunctionTy >
void GaloisRuntime::do_all_impl ( IterTy  b,
IterTy  e,
FunctionTy  f,
const char *  loopname = 0 
) [inline]

Backdoor function to enable stealing in do_all.

template<typename RangeTy , typename FunctionTy , typename ReducerTy >
FunctionTy GaloisRuntime::do_all_impl ( RangeTy  range,
FunctionTy  f,
ReducerTy  r,
bool  needsReduce 
) [inline]
template<typename RangeTy , typename FunctionTy , typename ReducerTy >
FunctionTy GaloisRuntime::do_all_impl_dispatch ( RangeTy  range,
FunctionTy  f,
ReducerTy  r,
bool  needsReduce,
std::input_iterator_tag   
) [inline]
template<typename RangeTy , typename FunctionTy , typename ReducerTy >
FunctionTy GaloisRuntime::do_all_impl_dispatch ( RangeTy  range,
FunctionTy  f,
ReducerTy  r,
bool  needsReduce,
std::random_access_iterator_tag   
) [inline]
void GaloisRuntime::doAcquire ( GaloisRuntime::Lockable C  ) 

actual locking function. Will always lock.

void GaloisRuntime::doCheckWrite (  ) 
void GaloisRuntime::endSampling (  ) 
template<typename InitTy , typename WorkTy >
static void GaloisRuntime::for_each_det_impl ( InitTy &  init,
WorkTy &  W 
) [inline, static]
template<typename WLTy , typename RangeTy , typename FunctionTy >
void GaloisRuntime::for_each_impl ( RangeTy  range,
FunctionTy  f,
const char *  loopname 
) [inline]
template<typename IterTy , typename ComparatorTy , typename NhFunc , typename OpFunc >
static void GaloisRuntime::for_each_ordered_2p ( IterTy  b,
IterTy  e,
ComparatorTy  comp,
NhFunc  f1,
OpFunc  f2,
const char *  loopname 
) [inline, static]

Ordered set iteration using deterministic executor.

template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc , typename StableTest >
void GaloisRuntime::for_each_ordered_impl ( Iter  beg,
Iter  end,
Cmp  cmp,
NhFunc  nhFunc,
OpFunc  opFunc,
StableTest  stabilityTest,
const char *  loopname 
) [inline]
template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc >
void GaloisRuntime::for_each_ordered_impl ( Iter  beg,
Iter  end,
Cmp  cmp,
NhFunc  nhFunc,
OpFunc  opFunc,
const char *  loopname 
) [inline]
template<typename AI , typename Cmp , typename OperFunc , typename NhoodFunc , typename StableTest >
void GaloisRuntime::for_each_ordered_lc ( AI  abeg,
AI  aend,
Cmp  cmp,
NhoodFunc  nhoodVisitor,
OperFunc  operFunc,
StableTest  stabilityTest,
const char *  loopname 
) [inline]
template<typename AI , typename Cmp , typename OperFunc , typename NhoodFunc >
void GaloisRuntime::for_each_ordered_lc ( AI  abeg,
AI  aend,
Cmp  cmp,
NhoodFunc  nhoodVisitor,
OperFunc  operFunc,
const char *  loopname 
) [inline]
void GaloisRuntime::forceAbort (  ) 
GaloisRuntime::PendingFlag GaloisRuntime::getPending (  ) 
GaloisRuntime::PerBackend & GaloisRuntime::getPPSBackend (  ) 
GaloisRuntime::PerBackend & GaloisRuntime::getPTSBackend (  ) 
GaloisRuntime::GBarrier & GaloisRuntime::getSystemBarrier (  ) 

Have a pre-instantiated barrier available for use.

GaloisRuntime::TerminationDetection & GaloisRuntime::getSystemTermination (  ) 
ThreadPool & GaloisRuntime::getSystemThreadPool (  ) 

Returns or creates the appropriate thread pool for the system.

Implement the global threadpool.

GaloisRuntime::SimpleRuntimeContext * GaloisRuntime::getThreadContext (  ) 

get the current conflict detection class, may be null if not in parallel region

void GaloisRuntime::initPTS (  ) 
static bool GaloisRuntime::isWriteMethod ( int  m  )  [inline, static]
template<typename T >
LocalRange<T> GaloisRuntime::makeLocalRange ( T &  obj  )  [inline]
template<typename IterTy >
StandardRange<IterTy> GaloisRuntime::makeStandardRange ( IterTy  begin,
IterTy  end 
) [inline]
template<typename FunctionTy >
void GaloisRuntime::on_each_impl ( FunctionTy  fn,
const char *  loopname = 0 
) [inline]
void GaloisRuntime::preAlloc_impl ( int  num  ) 
void GaloisRuntime::printStats (  ) 
void GaloisRuntime::reportSampling ( const char *  loopname  ) 
void GaloisRuntime::reportStat ( Galois::Statistic value  ) 
void GaloisRuntime::reportStat ( const std::string &  loopname,
const std::string &  category,
unsigned long  value 
)
void GaloisRuntime::reportStat ( const char *  loopname,
const char *  category,
unsigned long  value 
)
void GaloisRuntime::runAllLoopExitHandlers ( void   ) 
void GaloisRuntime::setPending ( GaloisRuntime::PendingFlag  value  ) 

Used by deterministic and ordered executor.

void GaloisRuntime::setThreadContext ( GaloisRuntime::SimpleRuntimeContext n  ) 

used by the parallel code to set up conflict detection per thread

static bool GaloisRuntime::shouldLock ( Galois::MethodFlag  g  )  [inline, static]

Helper function to decide if the conflict detection lock should be taken.

void GaloisRuntime::signalConflict (  ) 

Variable Documentation

const bool GaloisRuntime::debug = false [static]

the number of active threads

__thread char * GaloisRuntime::ppsBase
__thread char * GaloisRuntime::ptsBase

Generated on 12 Apr 2013 for Galois by  doxygen 1.6.1