20 #ifndef GALOIS_USERCONTEXT_H
21 #define GALOIS_USERCONTEXT_H
25 #include "galois/config.h"
84 template <
typename... Args>
85 void push(Args&&... args) {
93 template <
typename... Args>
95 this->
push(std::forward<Args>(args)...);
99 template <
typename... Args>
101 this->
push(std::forward<Args>(args)...);
108 template <
typename LS>
113 template <
typename LS,
typename... Args>
115 new (
localState) LS(std::forward<Args>(args)...);
116 return getLocalState<LS>();
PushBufferTy pushBuffer
Definition: UserContext.h:44
void * localState
Definition: UserContext.h:55
LS * createLocalState(Args &&...args)
Definition: UserContext.h:114
void abort()
Force the abort of this iteration.
Definition: UserContext.h:105
FastPushBack fastPushBack
Definition: UserContext.h:51
void push(Args &&...args)
Push new work.
Definition: UserContext.h:85
bool firstPassFlag
some flags used by deterministic
Definition: UserContext.h:54
void __setLocalState(void *p)
Definition: UserContext.h:67
void cautiousPoint()
declare that the operator has crossed the cautious point.
Definition: UserContext.h:128
void __resetFirstPass(void)
Definition: UserContext.h:61
size_t size() const
Definition: gdeque.h:348
void signalFailSafe(void)
Definition: libgalois/include/galois/runtime/Context.h:65
void __resetAlloc()
Definition: UserContext.h:57
void __setFirstPass(void)
Definition: UserContext.h:59
void clear()
Definition: gdeque.h:394
void insert(Args &&...args)
Push new work.
Definition: UserContext.h:100
static const unsigned int fastPushBackLimit
Definition: UserContext.h:41
IterAllocBaseTy IterationAllocatorBase
Allocator stuff.
Definition: UserContext.h:46
bool * didBreak
used by all
Definition: UserContext.h:50
void emplace_back(Args &&...args)
Definition: gdeque.h:462
void push_back(Args &&...args)
Push new work.
Definition: UserContext.h:94
void signalConflict(Lockable *=nullptr)
Definition: libgalois/include/galois/runtime/Context.h:52
PerIterAllocTy PerIterationAllocator
Definition: UserContext.h:47
This is the object passed to the user's parallel loop.
Definition: UserContext.h:37
PushBufferTy & __getPushBuffer()
Definition: UserContext.h:63
std::function< void(PushBufferTy &)> FastPushBack
Definition: UserContext.h:42
LS * getLocalState(void)
Store and retrieve local state for deterministic.
Definition: UserContext.h:109
void breakLoop()
Signal break in parallel loop, current iteration continues untill natural termination.
Definition: UserContext.h:78
PerIterAllocTy & getPerIterAlloc()
Acquire a per-iteration allocator.
Definition: UserContext.h:81
bool isFirstPass(void) const
used by deterministic and ordered
Definition: UserContext.h:123
void __setFastPushBack(FastPushBack f)
Definition: UserContext.h:69
UserContext()
Definition: UserContext.h:72
gdeque< T > PushBufferTy
push stuff
Definition: UserContext.h:40
void __resetPushBuffer()
Definition: UserContext.h:65
void clear()
Definition: runtime/Mem.h:475