Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::graphs::GluonSubstrate< GraphTy > Class Template Reference

Gluon communication substrate that handles communication given a user graph. More...

#include <GluonSubstrate.h>

Inheritance diagram for galois::graphs::GluonSubstrate< GraphTy >:
galois::runtime::GlobalObject

Public Member Functions

 GluonSubstrate ()=delete
 Delete default constructor: this class NEEDS to have a graph passed into it. More...
 
 GluonSubstrate (GraphTy &_userGraph, unsigned host, unsigned numHosts, bool _transposed, std::pair< unsigned, unsigned > _cartesianGrid=std::make_pair(0u, 0u), bool _partitionAgnostic=false, DataCommMode _enforcedDataMode=DataCommMode::noData)
 Constructor for GluonSubstrate. More...
 
template<WriteLocation writeLocation, ReadLocation readLocation, typename SyncFnTy , typename BitsetFnTy = galois::InvalidBitsetFnTy, bool async = false>
void sync (std::string loopName)
 Main sync call exposed to the user that calls the correct sync function based on provided template arguments. More...
 
template<ReadLocation readLocation, typename SyncFnTy , typename BitsetFnTy = galois::InvalidBitsetFnTy>
void syncOnDemand (galois::runtime::FieldFlags &fieldFlags, std::string loopName)
 Given a structure that contains flags signifying what needs to be synchronized, syncOnDemand will synchronize what is necessary based on the read location of the * field. More...
 
void set_num_run (const uint32_t runNum)
 Set the run number. More...
 
uint32_t get_run_num () const
 Get the set run number. More...
 
void set_num_round (const uint32_t round)
 Set the round number for use in the run identifier. More...
 
std::string get_run_identifier () const
 Get a run identifier using the set run and set round. More...
 
std::string get_run_identifier (std::string loop_name) const
 Get a run identifier using the set run and set round and append to the passed in string. More...
 
std::string get_run_identifier (std::string loop_name, unsigned alterID) const
 Get a run identifier using the set run and set round and append to the passed in string in addition to the number identifier passed in. More...
 
template<typename FnTy >
void reset_mirrorField ()
 Given a sync structure, reset the field specified by the structure to the 0 of the reduction on mirrors. More...
 

Additional Inherited Members

- Protected Member Functions inherited from galois::runtime::GlobalObject
 GlobalObject (const GlobalObject &)=delete
 
 GlobalObject (GlobalObject &&)=delete
 
template<typename T >
 GlobalObject (const T *ptr)
 Constructs a global object given a pointer to the object you want to make a global object. More...
 
uint32_t idForSelf () const
 Returns own global id. More...
 
- Static Protected Member Functions inherited from galois::runtime::GlobalObject
static uintptr_t ptrForObj (unsigned oid)
 Returns the pointer for a global object. More...
 

Detailed Description

template<typename GraphTy>
class galois::graphs::GluonSubstrate< GraphTy >

Gluon communication substrate that handles communication given a user graph.

User graph should provide certain things the substrate expects.

TODO documentation on expected things

Template Parameters
GraphTyUser graph to handle communication for

Constructor & Destructor Documentation

template<typename GraphTy >
galois::graphs::GluonSubstrate< GraphTy >::GluonSubstrate ( )
delete

Delete default constructor: this class NEEDS to have a graph passed into it.

template<typename GraphTy >
galois::graphs::GluonSubstrate< GraphTy >::GluonSubstrate ( GraphTy &  _userGraph,
unsigned  host,
unsigned  numHosts,
bool  _transposed,
std::pair< unsigned, unsigned >  _cartesianGrid = std::make_pair(0u, 0u),
bool  _partitionAgnostic = false,
DataCommMode  _enforcedDataMode = DataCommMode::noData 
)
inline

Constructor for GluonSubstrate.

Initializes metadata fields.

Parameters
_userGraphgraph to build substrate on
hosthost number that this graph resides on
numHoststotal number of hosts in the currently executing program
_transposedTrue if the graph is transposed
_cartesianGridcartesian grid for sync
_partitionAgnosticdetermines if sync should be partition agnostic or not
_enforcedDataModeForced data comm mode for sync

Member Function Documentation

template<typename GraphTy >
std::string galois::graphs::GluonSubstrate< GraphTy >::get_run_identifier ( ) const
inline

Get a run identifier using the set run and set round.

Returns
a string run identifier
template<typename GraphTy >
std::string galois::graphs::GluonSubstrate< GraphTy >::get_run_identifier ( std::string  loop_name) const
inline

Get a run identifier using the set run and set round and append to the passed in string.

Parameters
loop_nameString to append the run identifier
Returns
String with run identifier appended to passed in loop name
template<typename GraphTy >
std::string galois::graphs::GluonSubstrate< GraphTy >::get_run_identifier ( std::string  loop_name,
unsigned  alterID 
) const
inline

Get a run identifier using the set run and set round and append to the passed in string in addition to the number identifier passed in.

Parameters
loop_nameString to append the run identifier
alterIDanother ID with which to add to the timer name.
Returns
String with run identifier appended to passed in loop name + alterID
template<typename GraphTy >
uint32_t galois::graphs::GluonSubstrate< GraphTy >::get_run_num ( ) const
inline

Get the set run number.

Returns
The set run number saved in the graph
template<typename GraphTy >
template<typename FnTy >
void galois::graphs::GluonSubstrate< GraphTy >::reset_mirrorField ( )
inline

Given a sync structure, reset the field specified by the structure to the 0 of the reduction on mirrors.

Template Parameters
FnTystructure that specifies how synchronization is to be done
template<typename GraphTy >
void galois::graphs::GluonSubstrate< GraphTy >::set_num_round ( const uint32_t  round)
inline

Set the round number for use in the run identifier.

Parameters
roundround number to set to
template<typename GraphTy >
void galois::graphs::GluonSubstrate< GraphTy >::set_num_run ( const uint32_t  runNum)
inline

Set the run number.

Parameters
runNumNumber to set the run to
template<typename GraphTy >
template<WriteLocation writeLocation, ReadLocation readLocation, typename SyncFnTy , typename BitsetFnTy = galois::InvalidBitsetFnTy, bool async = false>
void galois::graphs::GluonSubstrate< GraphTy >::sync ( std::string  loopName)
inline

Main sync call exposed to the user that calls the correct sync function based on provided template arguments.

Must provide information through structures on how to do synchronization/which fields to synchronize.

Template Parameters
writeLocationLocation data is written (src or dst)
readLocationLocation data is read (src or dst)
SyncFnTysync structure for the field
BitsetFnTystruct that has info on how to access the bitset
Parameters
loopNameused to name timers for statistics
template<typename GraphTy >
template<ReadLocation readLocation, typename SyncFnTy , typename BitsetFnTy = galois::InvalidBitsetFnTy>
void galois::graphs::GluonSubstrate< GraphTy >::syncOnDemand ( galois::runtime::FieldFlags fieldFlags,
std::string  loopName 
)
inline

Given a structure that contains flags signifying what needs to be synchronized, syncOnDemand will synchronize what is necessary based on the read location of the * field.

Template Parameters
readLocationLocation in which field will need to be read
SyncFnTysync structure for the field
BitsetFnTystruct which holds a bitset which can be used to control synchronization at a more fine grain level
Parameters
fieldFlagsstructure for field you are syncing
loopNameName of loop this sync is for for naming timers

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