Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Graph

Classes

struct  Grappa::Empty
 Empty struct, for specifying lack of either Vertex or Edge data in Graph. More...
 
struct  Grappa::Graph< V, E >
 Distributed graph data structure, with customizable vertex and edge data. More...
 
struct  Grappa::AdjIterator< G >
 

Macros

#define OVERLOAD(...)
 

Typedefs

using Grappa::VertexID = int64_t
 Currently just an overload for int64, may someday be used for distinguishing parameters in forall(). More...
 

Functions

template<typename G >
AdjIterator< G > Grappa::adj (GlobalAddress< G > g, typename G::Vertex &v)
 Iterator over adjacent vertices. Used with Grappa::forall(). More...
 
template<typename G >
AdjIterator< G > Grappa::adj (GlobalAddress< G > g, GlobalAddress< typename G::Vertex > v)
 
template<typename G >
AdjIterator< G > Grappa::adj (GlobalAddress< G > g, VertexID i)
 
 Grappa::OVERLOAD (SyncMode S=SyncMode::Blocking, GlobalCompletionEvent *C=&impl::local_gce, int64_t Threshold=impl::USE_LOOP_THRESHOLD_FLAG)
 Parallel loop over adjacent vertices. Use adj() to construct iterator. More...
 
 Grappa::OVERLOAD (GlobalCompletionEvent *C, SyncMode S=SyncMode::Blocking, int64_t Threshold=impl::USE_LOOP_THRESHOLD_FLAG)
 
template<typename G = nullptr_t, typename F = nullptr_t>
void Grappa::serial_for (AdjIterator< G > a, F body)
 
template<GlobalCompletionEvent * C = &impl::local_gce, int64_t Threshold = impl::USE_LOOP_THRESHOLD_FLAG, typename V , typename E , typename F = nullptr_t>
void Grappa::forall (GlobalAddress< Graph< V, E >> g, F loop_body)
 Parallel iterator over Graph, specializes based on arguments. More...
 
static GlobalAddress< Graph > Grappa::Graph< V, E >::create (const TupleGraph &tg, bool directed=false, bool solo_invalid=true)
 Construct a distributed adjacency-list Graph. More...
 

Detailed Description

Macro Definition Documentation

#define OVERLOAD (   ...)
Value:
template< __VA_ARGS__, typename G = nullptr_t, typename F = nullptr_t > \
void forall(AdjIterator<G> a, F body) { \
impl::forall<S,C,Threshold>(a, body, &F::operator()); \
}
void forall(GlobalAddress< Graph< V, E >> g, F loop_body)
Parallel iterator over Graph, specializes based on arguments.
Definition: Graph.hpp:555

Definition at line 448 of file Graph.hpp.

Typedef Documentation

using Grappa::VertexID = typedef int64_t

Currently just an overload for int64, may someday be used for distinguishing parameters in forall().

Definition at line 50 of file Graph.hpp.

Function Documentation

template<typename G >
AdjIterator<G> Grappa::adj ( GlobalAddress< G >  g,
typename G::Vertex &  v 
)

Iterator over adjacent vertices. Used with Grappa::forall().

Definition at line 387 of file Graph.hpp.

template<typename G >
AdjIterator<G> Grappa::adj ( GlobalAddress< G >  g,
GlobalAddress< typename G::Vertex >  v 
)

Definition at line 392 of file Graph.hpp.

template<typename G >
AdjIterator<G> Grappa::adj ( GlobalAddress< G >  g,
VertexID  i 
)

Definition at line 397 of file Graph.hpp.

template<typename V , typename E >
GlobalAddress< Graph< V, E > > Grappa::Graph< V, E >::create ( const TupleGraph< V, E > &  tg,
bool  directed = false,
bool  solo_invalid = true 
)
static

Construct a distributed adjacency-list Graph.

Returns
The symmetric address to the 'proxy' allocated on each core, which has the size information and a portion of the graph.
Parameters
tginput edges
directedcreate additional edges to make it undirected
solo_invalidmark vertices with no in- or out-edges as invalid (not to be visited when iterating over vertices)

Definition at line 609 of file Graph.hpp.

template<GlobalCompletionEvent * C = &impl::local_gce, int64_t Threshold = impl::USE_LOOP_THRESHOLD_FLAG, typename V , typename E , typename F = nullptr_t>
void Grappa::forall ( GlobalAddress< Graph< V, E >>  g,
loop_body 
)

Parallel iterator over Graph, specializes based on arguments.

See Graph overview page for details.

Definition at line 555 of file Graph.hpp.

Grappa::OVERLOAD ( SyncMode  S = SyncMode::Blocking,
GlobalCompletionEvent *  C = &impl::local_gce,
int64_t  Threshold = impl::USE_LOOP_THRESHOLD_FLAG 
)

Parallel loop over adjacent vertices. Use adj() to construct iterator.

Grappa::OVERLOAD ( GlobalCompletionEvent *  C,
SyncMode  S = SyncMode::Blocking,
int64_t  Threshold = impl::USE_LOOP_THRESHOLD_FLAG 
)
template<typename G = nullptr_t, typename F = nullptr_t>
void Grappa::serial_for ( AdjIterator< G >  a,
body 
)

Definition at line 463 of file Graph.hpp.