Galois
|
Internal Galois functionality - Use at your own risk. More...
Namespaces | |
DEPRECATED | |
Functions used by the Galois runtime that are deprecated. | |
ParaMeter | |
Functions used by ParaMeter, which measures parallelism of loops. | |
Classes | |
class | DistStatManager |
Class responsible for tracking all statistics of a running distributed Galois program and reporting them at the end of program execution. More... | |
class | MemUsageTracker |
Class that tracks memory usage (mainly of send and receive buffers). More... | |
class | NetworkInterface |
A class that defines functions that a network interface in Galois should have. More... | |
class | NetworkIO |
Class for the network IO layer which is responsible for doing sends/receives of data. More... | |
class | SerializeBuffer |
Buffer for serialization of data. More... | |
class | DeSerializeBuffer |
Buffer for deserialization of data. More... | |
struct | LazyRef |
LazyRef structure; used to store both a type and an offset to begin saving data into. More... | |
class | StatRecvHelper |
class | Lockable |
All objects that may be locked (nodes primarily) must inherit from Lockable. More... | |
class | LockManagerBase |
class | SimpleRuntimeContext |
struct | AlwaysLockObj |
struct | CheckedLockObj |
struct | ForEachExecutor< worklists::Deterministic< T >, FunctionTy, ArgsTy > |
class | AbortHandler |
class | ForEachExecutor |
struct | reiterator |
struct | reiterator< WLTy, IterTy, typename std::enable_if< has_with_iterator< WLTy >(0)>::type > |
struct | has_serialize |
Indicates if T has the serialize trait. More... | |
struct | is_copyable |
Indicates if T is trivially copyable. More... | |
struct | is_serializable |
Indicates if T is serializable. More... | |
struct | is_memory_copyable |
Indicates if T is memory copyable. More... | |
class | iterable |
class | LoopStatistics |
class | LoopStatistics< false > |
class | MallocHeap |
[Example Third Party Allocator] More... | |
class | ThreadPrivateHeap |
[Example Third Party Allocator] More... | |
class | LockedHeap |
Apply a lock to a heap. More... | |
class | ZeroOut |
class | AddHeader |
Add a header to objects. More... | |
class | OwnerTaggedHeap |
Allow looking up parent heap pointers. More... | |
class | FreeListHeap |
Maintain a freelist. More... | |
class | SelfLockFreeListHeap |
Maintain a freelist using a lock which doesn't cover SourceHeap. More... | |
class | BlockHeap |
class | BumpHeap |
This implements a bump pointer though chunks of memory. More... | |
class | BumpWithMallocHeap |
This implements a bump pointer though chunks of memory that falls back to malloc if the source heap cannot accommodate an allocation. More... | |
class | SystemHeap |
This is the base source of memory for all allocators. More... | |
class | StaticSingleInstance |
class | PageHeap |
class | SizedHeapFactory |
struct | VariableSizeHeap |
Scalable variable-size allocations. More... | |
class | FixedSizeHeap |
Main scalable allocator in Galois. More... | |
class | SerialNumaHeap |
class | FixedSizeAllocator |
A fixed size block allocator. More... | |
class | FixedSizeAllocator< void > |
class | Pow_2_BlockHeap |
class | Pow_2_BlockAllocator |
class | Pow_2_BlockAllocator< void > |
class | ExternalHeapAllocator |
Keep a reference to an external allocator. More... | |
class | ExternalHeapAllocator< void, HeapTy > |
class | SerialNumaAllocator |
class | LocalRange |
class | StandardRange |
class | SpecificRange |
SpecificRange is a range type where a threads range is specified by an an int array that tells you where each thread should begin its iteration. More... | |
class | SharedMem |
class | RunningMin |
class | RunningMax |
class | RunningSum |
class | RunningVec |
class | NamedStat |
class | AggregStat |
struct | StatTotal |
class | StatManager |
class | ThreadTimer |
class | ThreadTimers |
class | PerThreadTimer |
class | PerThreadTimer< false > |
class | Fixed2DGraphTiledExecutor |
class | UserContextAccess |
Backdoor to allow runtime methods to access private data in UserContext. More... | |
class | GlobalObject |
A class to be inherited from so that all child classes will have a tracked unique ID. More... | |
class | FieldFlags |
Each field has a FieldFlags object that indicates synchronization status of that field. More... | |
Typedefs | |
using | SendBuffer = SerializeBuffer |
typedef for buffer that stores data to be sent out More... | |
using | RecvBuffer = DeSerializeBuffer |
typedef for buffer that received data is saved into More... | |
template<typename T > | |
using | OperatorReferenceType = typename internal::OperatorReferenceType_impl< T >::type |
Enumerations | |
enum | ConflictFlag { CONFLICT = -1, NO_CONFLICT = 0, REACHED_FAILSAFE = 1, BREAK = 2 } |
enum | BITVECTOR_STATUS { NONE_INVALID, SRC_INVALID, DST_INVALID, BOTH_INVALID } |
Bitvector status enum specifying validness of certain things in bitvector. More... | |
Functions | |
template<typename S1 , typename S2 , typename T > | |
void | reportDistStat (const S1 ®ion, const S2 &category, const T &value, const StatTotal::Type &thrdTotalTy, const StatTotal::Type &hTotalTy) |
Adds a statistic to the statistics manager. More... | |
NetworkInterface & | getSystemNetworkInterface () |
Get the network interface. More... | |
uint32_t | getHostID () |
Gets this host's ID. More... | |
NetworkInterface & | makeNetworkBuffered () |
Returns a BufferedNetwork interface. More... | |
NetworkInterface & | makeNetworkLCI () |
Returns a LCINetwork interface. More... | |
substrate::Barrier & | getHostBarrier () |
Returns a host barrier, which is a regular MPI-Like Barrier for all hosts. More... | |
substrate::Barrier & | getHostFence () |
Returns a fence that ensures all pending messages are delivered, acting like a memory-barrier. More... | |
std::tuple< std::unique_ptr < NetworkIO >, uint32_t, uint32_t > | makeNetworkIOMPI (galois::runtime::MemUsageTracker &tracker, std::atomic< size_t > &sends, std::atomic< size_t > &recvs) |
Creates/returns a network IO layer that uses MPI to do communication. More... | |
template<typename T1 , typename... Args> | |
void | gDeserialize (DeSerializeBuffer &buf, T1 &&t1, Args &&...args) |
Deserialize data in a buffer into a series of objects. More... | |
void | gDeserialize (DeSerializeBuffer &) |
Base case for regular gDeserialize recursive call. More... | |
template<typename Iter , typename T > | |
auto | gDeserializeRaw (Iter iter, T &data) -> decltype(std::declval< typename std::enable_if< is_memory_copyable< T >::value >::type >(), Iter()) |
"Deserialize" data in an iterator type into a data object. More... | |
void | signalConflict (Lockable *=nullptr) |
void | signalFailSafe (void) |
SimpleRuntimeContext * | getThreadContext () |
get the current conflict detection class, may be null if not in parallel region More... | |
void | setThreadContext (SimpleRuntimeContext *n) |
used by the parallel code to set up conflict detection per thread More... | |
bool | shouldLock (const galois::MethodFlag g) |
Helper function to decide if the conflict detection lock should be taken. More... | |
void | doAcquire (Lockable *lockable, galois::MethodFlag m) |
actual locking function. Will always lock. More... | |
void | acquire (Lockable *lockable, galois::MethodFlag m) |
Master function which handles conflict detection used to acquire a lockable thing. More... | |
template<typename R , typename F , typename ArgsTuple > | |
void | do_all_gen (const R &range, F &&func, const ArgsTuple &argsTuple) |
template<typename WLTy > | |
constexpr auto | has_with_iterator (int) -> decltype(std::declval< typename WLTy::template with_iterator< int * >::type >(), bool()) |
template<typename > | |
constexpr auto | has_with_iterator (...) -> bool |
template<typename RangeTy , typename FunctionTy , typename ArgsTy > | |
void | for_each_impl (const RangeTy &range, FunctionTy &&fn, const ArgsTy &args) |
template<typename RangeTy , typename FunctionTy , typename TupleTy > | |
void | for_each_gen (const RangeTy &r, FunctionTy &&fn, const TupleTy &tpl) |
Normalize arguments to for_each. More... | |
template<typename FunctionTy , typename TupleTy > | |
void | on_each_gen (FunctionTy &&fn, const TupleTy &tpl) |
template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc > | |
void | for_each_ordered_impl (Iter GALOIS_UNUSED(beg), Iter GALOIS_UNUSED(end), const Cmp &GALOIS_UNUSED(cmp), const NhFunc &GALOIS_UNUSED(nhFunc), const OpFunc &GALOIS_UNUSED(opFunc), const char *GALOIS_UNUSED(loopname)) |
template<typename Iter , typename Cmp , typename NhFunc , typename OpFunc , typename StableTest > | |
void | for_each_ordered_impl (Iter GALOIS_UNUSED(beg), Iter GALOIS_UNUSED(end), const Cmp &GALOIS_UNUSED(cmp), const NhFunc &GALOIS_UNUSED(nhFunc), const OpFunc &GALOIS_UNUSED(opFunc), const StableTest &GALOIS_UNUSED(stabilityTest), const char *GALOIS_UNUSED(loopname)) |
void | preAlloc_impl (unsigned num) |
Memory management functionality. More... | |
void | pagePreAlloc (int numpages) |
Preallocate numpages large pages for each thread. More... | |
void | pageIn (void *buf, size_t len, size_t stride) |
Forces the given block to be paged into physical memory. More... | |
void | pageInReadOnly (void *buf, size_t len, size_t stride) |
Forces the given readonly block to be paged into physical memory. More... | |
int | numNumaAllocForNode (unsigned nodeid) |
Returns total small pages allocated by OS on a NUMA node. More... | |
void | printInterleavedStats (int minPages=16 *1024) |
Print lines from /proc/pid/numa_maps that contain at least n (non-huge) pages. More... | |
void * | pagePoolAlloc () |
Low level page pool (individual pages, use largeMalloc for large blocks) More... | |
void | pagePoolFree (void *) |
void | pagePoolPreAlloc (unsigned) |
size_t | pagePoolSize () |
int | numPagePoolAllocTotal () |
Returns total large pages allocated by Galois memory management subsystem. More... | |
int | numPagePoolAllocForThread (unsigned tid) |
Returns total large pages allocated for thread by Galois memory management subsystem. More... | |
template<typename F > | |
void | profileVtune (const F &func, const char *region) |
template<typename F > | |
void | profilePapi (const F &func, const char *region) |
template<typename T > | |
LocalRange< T > | makeLocalRange (T &obj) |
template<typename IterTy > | |
StandardRange< IterTy > | makeStandardRange (IterTy begin, IterTy end) |
template<typename IterTy > | |
SpecificRange< IterTy > | makeSpecificRange (IterTy begin, IterTy end, const uint32_t *thread_ranges) |
Creates a SpecificRange object. More... | |
boost::uuids::uuid | getRandUUID () |
template<typename S1 , typename S2 , typename T > | |
void | reportStat (const S1 ®ion, const S2 &category, const T &value, const StatTotal::Type &type) |
template<typename S1 , typename S2 , typename T > | |
void | reportStat_Single (const S1 ®ion, const S2 &category, const T &value) |
template<typename S1 , typename S2 , typename T > | |
void | reportStat_Tmin (const S1 ®ion, const S2 &category, const T &value) |
template<typename S1 , typename S2 , typename T > | |
void | reportStat_Tmax (const S1 ®ion, const S2 &category, const T &value) |
template<typename S1 , typename S2 , typename T > | |
void | reportStat_Tsum (const S1 ®ion, const S2 &category, const T &value) |
template<typename S1 , typename S2 , typename T > | |
void | reportStat_Tavg (const S1 ®ion, const S2 &category, const T &value) |
template<bool Report = false, typename S1 , typename S2 , typename T > | |
void | reportStatCond (const S1 ®ion, const S2 &category, const T &value, const StatTotal::Type &type) |
template<bool Report = false, typename S1 , typename S2 , typename T > | |
void | reportStatCond_Single (const S1 ®ion, const S2 &category, const T &value) |
template<bool Report = false, typename S1 , typename S2 , typename T > | |
void | reportStatCond_Tmin (const S1 ®ion, const S2 &category, const T &value) |
template<bool Report = false, typename S1 , typename S2 , typename T > | |
void | reportStatCond_Tmax (const S1 ®ion, const S2 &category, const T &value) |
template<bool Report = false, typename S1 , typename S2 , typename T > | |
void | reportStatCond_Tsum (const S1 ®ion, const S2 &category, const T &value) |
template<bool Report = false, typename S1 , typename S2 , typename T > | |
void | reportStatCond_Tavg (const S1 ®ion, const S2 &category, const T &value) |
template<typename S1 , typename S2 , typename V > | |
void | reportParam (const S1 ®ion, const S2 &category, const V &value) |
void | setStatFile (const std::string &f) |
void | reportRUsage (const std::string &id) |
Reports maximum resident set size and page faults stats using rusage. More... | |
void | reportPageAlloc (const char *category) |
Reports Galois system memory stats for all threads. More... | |
void | reportNumaAlloc (const char *category) |
Reports NUMA memory stats for all NUMA nodes. More... | |
substrate::Barrier & | getBarrier (unsigned activeThreads) |
Have a pre-instantiated barrier available for use. More... | |
template<typename T > | |
internal::vecPrinter< T > | printVec (const galois::PODResizeableArray< T > &v) |
Given a vector, returns a vector printer object that is able to print the vector out onto an output stream. More... | |
bool | src_invalid (BITVECTOR_STATUS bv_flag) |
Return true if the sources are invalid in bitvector flag. More... | |
bool | dst_invalid (BITVECTOR_STATUS bv_flag) |
Return true if the destinations are invalid in bitvector flag. More... | |
void | make_src_invalid (BITVECTOR_STATUS *bv_flag) |
Marks sources invalid on passed in bitvector flag. More... | |
void | make_dst_invalid (BITVECTOR_STATUS *bv_flag) |
Marks destinations invalid on passed in bitvector flag. More... | |
Variables | |
uint32_t | evilPhase = 1 |
Variable that keeps track of which network send/recv phase a program is currently on. More... | |
unsigned int | activeThreads = 1 |
thread_local std::jmp_buf | execFrame |
Internal Galois functionality - Use at your own risk.
using galois::runtime::OperatorReferenceType = typedef typename internal::OperatorReferenceType_impl<T>::type |
using galois::runtime::RecvBuffer = typedef DeSerializeBuffer |
typedef for buffer that received data is saved into
using galois::runtime::SendBuffer = typedef SerializeBuffer |
typedef for buffer that stores data to be sent out
|
inline |
Master function which handles conflict detection used to acquire a lockable thing.
void galois::runtime::do_all_gen | ( | const R & | range, |
F && | func, | ||
const ArgsTuple & | argsTuple | ||
) |
|
inline |
actual locking function. Will always lock.
bool galois::runtime::dst_invalid | ( | BITVECTOR_STATUS | bv_flag | ) |
Return true if the destinations are invalid in bitvector flag.
void galois::runtime::for_each_gen | ( | const RangeTy & | r, |
FunctionTy && | fn, | ||
const TupleTy & | tpl | ||
) |
Normalize arguments to for_each.
void galois::runtime::for_each_impl | ( | const RangeTy & | range, |
FunctionTy && | fn, | ||
const ArgsTy & | args | ||
) |
void galois::runtime::for_each_ordered_impl | ( | Iter | GALOIS_UNUSEDbeg, |
Iter | GALOIS_UNUSEDend, | ||
const Cmp & | GALOIS_UNUSEDcmp, | ||
const NhFunc & | GALOIS_UNUSEDnhFunc, | ||
const OpFunc & | GALOIS_UNUSEDopFunc, | ||
const char * | GALOIS_UNUSEDloopname | ||
) |
void galois::runtime::for_each_ordered_impl | ( | Iter | GALOIS_UNUSEDbeg, |
Iter | GALOIS_UNUSEDend, | ||
const Cmp & | GALOIS_UNUSEDcmp, | ||
const NhFunc & | GALOIS_UNUSEDnhFunc, | ||
const OpFunc & | GALOIS_UNUSEDopFunc, | ||
const StableTest & | GALOIS_UNUSEDstabilityTest, | ||
const char * | GALOIS_UNUSEDloopname | ||
) |
void galois::runtime::gDeserialize | ( | DeSerializeBuffer & | buf, |
T1 && | t1, | ||
Args &&... | args | ||
) |
Deserialize data in a buffer into a series of objects.
|
inline |
Base case for regular gDeserialize recursive call.
auto galois::runtime::gDeserializeRaw | ( | Iter | iter, |
T & | data | ||
) | -> decltype( std::declval<typename std::enable_if<is_memory_copyable<T>::value>::type>(), Iter()) |
"Deserialize" data in an iterator type into a data object.
Iter | iterator type that has objects of type T |
T | type of data to deserialize into |
iter | Iterator containing data that we want to save into the passed in data reference |
data | Object to save data in the iterator type into |
galois::substrate::Barrier & galois::runtime::getBarrier | ( | unsigned | activeThreads | ) |
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::substrate::Barrier & galois::runtime::getHostBarrier | ( | ) |
Returns a host barrier, which is a regular MPI-Like Barrier for all hosts.
galois::substrate::Barrier & galois::runtime::getHostFence | ( | ) |
Returns a fence that ensures all pending messages are delivered, acting like a memory-barrier.
uint32_t galois::runtime::getHostID | ( | ) |
Gets this host's ID.
Returns 0.
boost::uuids::uuid galois::runtime::getRandUUID | ( | void | ) |
NetworkInterface & galois::runtime::getSystemNetworkInterface | ( | ) |
Get the network interface.
galois::runtime::SimpleRuntimeContext * galois::runtime::getThreadContext | ( | ) |
get the current conflict detection class, may be null if not in parallel region
constexpr auto galois::runtime::has_with_iterator | ( | int | ) | -> decltype( std::declval<typename WLTy::template with_iterator<int*>::type>(), bool()) |
constexpr auto galois::runtime::has_with_iterator | ( | ... | ) | -> bool |
void galois::runtime::make_dst_invalid | ( | BITVECTOR_STATUS * | bv_flag | ) |
Marks destinations invalid on passed in bitvector flag.
void galois::runtime::make_src_invalid | ( | BITVECTOR_STATUS * | bv_flag | ) |
Marks sources invalid on passed in bitvector flag.
|
inline |
NetworkInterface & galois::runtime::makeNetworkBuffered | ( | ) |
Returns a BufferedNetwork interface.
Create a buffered network interface, or return one if already created.
std::tuple< std::unique_ptr< galois::runtime::NetworkIO >, uint32_t, uint32_t > galois::runtime::makeNetworkIOMPI | ( | galois::runtime::MemUsageTracker & | tracker, |
std::atomic< size_t > & | sends, | ||
std::atomic< size_t > & | recvs | ||
) |
Creates/returns a network IO layer that uses MPI to do communication.
NetworkInterface& galois::runtime::makeNetworkLCI | ( | ) |
Returns a LCINetwork interface.
|
inline |
Creates a SpecificRange object.
IterTy | The iterator type used by the range object |
begin | The global beginning of the range |
end | The global end of the range |
thread_ranges | An array of iterators that specifies where each thread's range begins |
|
inline |
int galois::runtime::numNumaAllocForNode | ( | unsigned | nodeid | ) |
Returns total small pages allocated by OS on a NUMA node.
int galois::runtime::numPagePoolAllocForThread | ( | unsigned | tid | ) |
Returns total large pages allocated for thread by Galois memory management subsystem.
int galois::runtime::numPagePoolAllocTotal | ( | ) |
Returns total large pages allocated by Galois memory management subsystem.
|
inline |
void galois::runtime::pageIn | ( | void * | buf, |
size_t | len, | ||
size_t | stride | ||
) |
Forces the given block to be paged into physical memory.
void galois::runtime::pageInReadOnly | ( | void * | buf, |
size_t | len, | ||
size_t | stride | ||
) |
Forces the given readonly block to be paged into physical memory.
void * galois::runtime::pagePoolAlloc | ( | ) |
Low level page pool (individual pages, use largeMalloc for large blocks)
void galois::runtime::pagePoolFree | ( | void * | ptr | ) |
void galois::runtime::pagePoolPreAlloc | ( | unsigned | num | ) |
size_t galois::runtime::pagePoolSize | ( | ) |
void galois::runtime::pagePreAlloc | ( | int | numpages | ) |
Preallocate numpages large pages for each thread.
void galois::runtime::preAlloc_impl | ( | unsigned | num | ) |
Memory management functionality.
void galois::runtime::printInterleavedStats | ( | int | minPages = 16 *1024 | ) |
Print lines from /proc/pid/numa_maps that contain at least n (non-huge) pages.
internal::vecPrinter<T> galois::runtime::printVec | ( | const galois::PODResizeableArray< T > & | v | ) |
Given a vector, returns a vector printer object that is able to print the vector out onto an output stream.
void galois::runtime::profilePapi | ( | const F & | func, |
const char * | region | ||
) |
void galois::runtime::profileVtune | ( | const F & | func, |
const char * | region | ||
) |
|
inline |
Adds a statistic to the statistics manager.
Calls addToStat in DistStatManager.
region | Region name to give statistic |
category | Category of statistic |
value | Value of the statistic |
thrdTotalTy | The type of reduction used to combine thread statistics of the same kind |
hTotalTy | The type of reduction used to combine host statistics of the same kind |
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::reportParam | ( | const S1 & | region, |
const S2 & | category, | ||
const V & | value | ||
) |
void galois::runtime::reportRUsage | ( | const std::string & | id | ) |
Reports maximum resident set size and page faults stats using rusage.
id | Identifier to prefix stat with in statistics output |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void galois::runtime::setStatFile | ( | const std::string & | f | ) |
void galois::runtime::setThreadContext | ( | SimpleRuntimeContext * | n | ) |
used by the parallel code to set up conflict detection per thread
|
inline |
Helper function to decide if the conflict detection lock should be taken.
|
inline |
|
inline |
bool galois::runtime::src_invalid | ( | BITVECTOR_STATUS | bv_flag | ) |
Return true if the sources are invalid in bitvector flag.
unsigned galois::runtime::activeThreads = 1 |
uint32_t galois::runtime::evilPhase = 1 |
Variable that keeps track of which network send/recv phase a program is currently on.
Can be seen as a count of send/recv rounds that have occured.
thread_local jmp_buf galois::runtime::execFrame |