Grappa  r3821, hash 22cd626d567a91ead5b23302066d1e9469f45c66
Grappa::GlobalBag< T > Class Template Reference

Global unordered queue with local insert and iteration. More...

#include <GlobalBag.hpp>

Public Member Functions

 GlobalBag ()
 
 GlobalBag (GlobalAddress< GlobalBag > self, size_t n)
 
 ~GlobalBag ()
 
void destroy ()
 
void add (const T &o)
 
void clear ()
 
size_t local_size ()
 
size_t size ()
 
bool empty ()
 

Static Public Member Functions

static GlobalAddress< GlobalBagcreate (size_t total_capacity)
 

Detailed Description

template<typename T>
class Grappa::GlobalBag< T >

Global unordered queue with local insert and iteration.

Useful for situations where intermediate values may be produced from anywhere and iterated over later. We use this mostly for places like BFS's "frontier", where things to process next phase are stored in a bag so they can be processed without communicating.

Definition at line 12 of file GlobalBag.hpp.

Constructor & Destructor Documentation

template<typename T>
Grappa::GlobalBag< T >::GlobalBag ( )
inline

Definition at line 18 of file GlobalBag.hpp.

template<typename T>
Grappa::GlobalBag< T >::GlobalBag ( GlobalAddress< GlobalBag< T > >  self,
size_t  n 
)
inline

Definition at line 19 of file GlobalBag.hpp.

template<typename T>
Grappa::GlobalBag< T >::~GlobalBag ( )
inline

Definition at line 21 of file GlobalBag.hpp.

Member Function Documentation

template<typename T>
void Grappa::GlobalBag< T >::add ( const T &  o)
inline

Definition at line 39 of file GlobalBag.hpp.

template<typename T>
void Grappa::GlobalBag< T >::clear ( )
inline

Definition at line 45 of file GlobalBag.hpp.

template<typename T>
static GlobalAddress<GlobalBag> Grappa::GlobalBag< T >::create ( size_t  total_capacity)
inlinestatic

Definition at line 23 of file GlobalBag.hpp.

template<typename T>
void Grappa::GlobalBag< T >::destroy ( )
inline

Definition at line 33 of file GlobalBag.hpp.

template<typename T>
bool Grappa::GlobalBag< T >::empty ( )
inline

Definition at line 60 of file GlobalBag.hpp.

template<typename T>
size_t Grappa::GlobalBag< T >::local_size ( )
inline

Definition at line 53 of file GlobalBag.hpp.

template<typename T>
size_t Grappa::GlobalBag< T >::size ( )
inline

Definition at line 55 of file GlobalBag.hpp.


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