GRAPHCODE_NS::Graph Class Reference

#include <graphcode.h>

Inheritance diagram for GRAPHCODE_NS::Graph:
Inheritance graph
Collaboration diagram for GRAPHCODE_NS::Graph:
Collaboration graph

Public Member Functions

bool type_registered (const object &x)
 
 Graph (Graph &g)
 
Graphoperator= (const Graph &x)
 
void rebuild_local_list ()
 
void clear_non_local ()
 
void print (unsigned proc)
 
void gather ()
 gather all data onto processor 0
 
void Prepare_Neighbours (bool cache_requests=false)
 
void Partition_Objects ()
 partition
 
void Distribute_Objects ()
 
objrefAddObject (object *o, GraphID_t id, bool managed=false)
 
objrefAddObject (object &p, GraphID_t id)
 
template<class T >
objrefAddObject (GraphID_t id)
 
template<class T >
objrefAddObject (const T &master_copy, GraphID_t id)
 
- Public Member Functions inherited from GRAPHCODE_NS::Ptrlist
iterator begin () const
 
iterator end () const
 
objreffront ()
 
objrefback ()
 
const objreffront () const
 
const objrefback () const
 
objrefoperator[] (unsigned i) const
 
void push_back (objref *x)
 
void push_back (objref &x)
 
void erase (GraphID_t i)
 
void clear ()
 
size_type size () const
 
Ptrlistoperator= (const Ptrlist &x)
 
void lpack (pack_t &targ) const
 
void lunpack (pack_t &targ)
 

Public Attributes

vector< vector< GraphID_t > > rec_req
 
vector< vector< GraphID_t > > requests
 
unsigned tag
 
omapobjects
 

Additional Inherited Members

- Public Types inherited from GRAPHCODE_NS::Ptrlist
typedef vector< objref * >::size_type size_type
 

Detailed Description

Graph is a list of node refs stored on local processor, and has a map of object references (called objects) referring to the nodes.

Member Function Documentation

◆ AddObject() [1/3]

objref& GRAPHCODE_NS::Graph::AddObject ( object o,
GraphID_t  id,
bool  managed = false 
)
inline

add the specified object into the Graph

References GRAPHCODE_NS::objref::addref().

◆ AddObject() [2/3]

template<class T >
objref& GRAPHCODE_NS::Graph::AddObject ( GraphID_t  id)
inline

add a new object of type T:

  • use as graph.AddObject<foo>(id);

◆ AddObject() [3/3]

template<class T >
objref& GRAPHCODE_NS::Graph::AddObject ( const T &  master_copy,
GraphID_t  id 
)
inline

add a new object initialised by master_copy

◆ clear_non_local()

void GRAPHCODE_NS::Graph::clear_non_local ( )
inline

remove from local memory any objects not hosted locally

References ecolab::myid.

◆ Distribute_Objects()

void GRAPHCODE_NS::Graph::Distribute_Objects ( )
inline

distribute objects from proc 0 according to partitioning set in the objref's proc field

◆ Prepare_Neighbours()

void GRAPHCODE_NS::Graph::Prepare_Neighbours ( bool  cache_requests = false)

Prepare cached copies of objects linked to by locally hosted objects

  • cache_requests=true means recompute the communication pattern

◆ print()

void GRAPHCODE_NS::Graph::print ( unsigned  proc)
inline

print IDs of objects hosted on proc 0, for debugging purposes

References ecolab::myid.

◆ rebuild_local_list()

void GRAPHCODE_NS::Graph::rebuild_local_list ( )
inline

Rebuild the list of locally hosted objects

References ecolab::myid.


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