Indicates the operator has a member type that encapsulates state that is passed between the suspension and resumpsion of an operator during deterministic scheduling. More...
#include <TypeTraits.h>
Indicates the operator has a member type that encapsulates state that is passed between the suspension and resumpsion of an operator during deterministic scheduling.
The type conforms to the following:
struct T { struct GaloisDeteministicLocalState { int x, y, z; // Local state GaloisDeterministicLocalState(T& self, Galois::PerIterAllocTy& alloc) { // initialize local state } }; void operator()(const A& item, Galois::UserContext<A>&) { // An example of using local state typedef GaloisDeterministicLocalState LS; bool used; LS* p = (LS*) ctx.getLocalState(used); if (used) { // operator is being resumed; use p } else { // operator hasn't been suspended yet; execute normally // save state into p to be used when operator resumes } } };