Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::UserContext< T > Class Template Reference

This is the object passed to the user's parallel loop. More...

#include <UserContext.h>

Inheritance diagram for galois::UserContext< T >:
galois::runtime::UserContextAccess< T >

Public Member Functions

 UserContext ()
 
void breakLoop ()
 Signal break in parallel loop, current iteration continues untill natural termination. More...
 
PerIterAllocTygetPerIterAlloc ()
 Acquire a per-iteration allocator. More...
 
template<typename... Args>
void push (Args &&...args)
 Push new work. More...
 
template<typename... Args>
void push_back (Args &&...args)
 Push new work. More...
 
template<typename... Args>
void insert (Args &&...args)
 Push new work. More...
 
void abort ()
 Force the abort of this iteration. More...
 
template<typename LS >
LS * getLocalState (void)
 Store and retrieve local state for deterministic. More...
 
template<typename LS , typename... Args>
LS * createLocalState (Args &&...args)
 
bool isFirstPass (void) const
 used by deterministic and ordered More...
 
void cautiousPoint ()
 declare that the operator has crossed the cautious point. More...
 

Protected Types

typedef gdeque< T > PushBufferTy
 push stuff More...
 
typedef std::function< void(PushBufferTy &)> FastPushBack
 

Protected Member Functions

void __resetAlloc ()
 
void __setFirstPass (void)
 
void __resetFirstPass (void)
 
PushBufferTy__getPushBuffer ()
 
void __resetPushBuffer ()
 
void __setLocalState (void *p)
 
void __setFastPushBack (FastPushBack f)
 

Protected Attributes

PushBufferTy pushBuffer
 
IterAllocBaseTy IterationAllocatorBase
 Allocator stuff. More...
 
PerIterAllocTy PerIterationAllocator
 
bool * didBreak = nullptr
 used by all More...
 
FastPushBack fastPushBack
 
bool firstPassFlag = false
 some flags used by deterministic More...
 
void * localState = nullptr
 

Static Protected Attributes

static const unsigned int fastPushBackLimit = 64
 

Detailed Description

template<typename T>
class galois::UserContext< T >

This is the object passed to the user's parallel loop.

This provides the in-loop api.

Member Typedef Documentation

template<typename T>
typedef std::function<void(PushBufferTy&)> galois::UserContext< T >::FastPushBack
protected
template<typename T>
typedef gdeque<T> galois::UserContext< T >::PushBufferTy
protected

push stuff

Constructor & Destructor Documentation

template<typename T>
galois::UserContext< T >::UserContext ( )
inline

Member Function Documentation

template<typename T>
PushBufferTy& galois::UserContext< T >::__getPushBuffer ( )
inlineprotected
template<typename T>
void galois::UserContext< T >::__resetAlloc ( )
inlineprotected
template<typename T>
void galois::UserContext< T >::__resetFirstPass ( void  )
inlineprotected
template<typename T>
void galois::UserContext< T >::__resetPushBuffer ( )
inlineprotected
template<typename T>
void galois::UserContext< T >::__setFastPushBack ( FastPushBack  f)
inlineprotected
template<typename T>
void galois::UserContext< T >::__setFirstPass ( void  )
inlineprotected
template<typename T>
void galois::UserContext< T >::__setLocalState ( void *  p)
inlineprotected
template<typename T>
void galois::UserContext< T >::abort ( )
inline

Force the abort of this iteration.

template<typename T>
void galois::UserContext< T >::breakLoop ( )
inline

Signal break in parallel loop, current iteration continues untill natural termination.

template<typename T>
void galois::UserContext< T >::cautiousPoint ( )
inline

declare that the operator has crossed the cautious point.

This implies all data has been touched thus no new locks will be acquired.

template<typename T>
template<typename LS , typename... Args>
LS* galois::UserContext< T >::createLocalState ( Args &&...  args)
inline
template<typename T>
template<typename LS >
LS* galois::UserContext< T >::getLocalState ( void  )
inline

Store and retrieve local state for deterministic.

template<typename T>
PerIterAllocTy& galois::UserContext< T >::getPerIterAlloc ( )
inline

Acquire a per-iteration allocator.

template<typename T>
template<typename... Args>
void galois::UserContext< T >::insert ( Args &&...  args)
inline

Push new work.

template<typename T>
bool galois::UserContext< T >::isFirstPass ( void  ) const
inline

used by deterministic and ordered

Returns
true when the operator is invoked for the first time. The operator can use this information and choose to expand the neighborhood only in the first pass.
template<typename T>
template<typename... Args>
void galois::UserContext< T >::push ( Args &&...  args)
inline

Push new work.

template<typename T>
template<typename... Args>
void galois::UserContext< T >::push_back ( Args &&...  args)
inline

Push new work.

Member Data Documentation

template<typename T>
bool* galois::UserContext< T >::didBreak = nullptr
protected

used by all

template<typename T>
FastPushBack galois::UserContext< T >::fastPushBack
protected
template<typename T>
const unsigned int galois::UserContext< T >::fastPushBackLimit = 64
staticprotected
template<typename T>
bool galois::UserContext< T >::firstPassFlag = false
protected

some flags used by deterministic

template<typename T>
IterAllocBaseTy galois::UserContext< T >::IterationAllocatorBase
protected

Allocator stuff.

template<typename T>
void* galois::UserContext< T >::localState = nullptr
protected
template<typename T>
PerIterAllocTy galois::UserContext< T >::PerIterationAllocator
protected
template<typename T>
PushBufferTy galois::UserContext< T >::pushBuffer
protected

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