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

Distributed sum-reducer for getting the sum of some value across multiple hosts. More...

#include <DTerminationDetector.h>

Public Member Functions

 DGTerminator ()
 Default constructor. More...
 
void reinitialize ()
 
DGTerminatoroperator+= (const Ty &rhs)
 Adds to accumulated value. More...
 
void operator= (const Ty rhs)
 Sets current value stored in accumulator. More...
 
void set (const Ty rhs)
 Sets current value stored in accumulator. More...
 
Ty read_local ()
 Read local accumulated value. More...
 
Ty read ()
 Read the value returned by the last reduce call. More...
 
Ty reset ()
 Reset the entire accumulator. More...
 
void initiate_snapshot ()
 
bool terminate ()
 
Ty reduce (std::string runID=std::string())
 Reduce data across all hosts, saves the value, and returns the reduced value. More...
 

Detailed Description

template<typename Ty>
class galois::DGTerminator< Ty >

Distributed sum-reducer for getting the sum of some value across multiple hosts.

Template Parameters
Tytype of value to max-reduce

Constructor & Destructor Documentation

template<typename Ty >
galois::DGTerminator< Ty >::DGTerminator ( )
inline

Default constructor.

Member Function Documentation

template<typename Ty >
void galois::DGTerminator< Ty >::initiate_snapshot ( )
inline
template<typename Ty >
DGTerminator& galois::DGTerminator< Ty >::operator+= ( const Ty &  rhs)
inline

Adds to accumulated value.

Parameters
rhsValue to add
Returns
reference to this object
template<typename Ty >
void galois::DGTerminator< Ty >::operator= ( const Ty  rhs)
inline

Sets current value stored in accumulator.

Parameters
rhsValue to set
template<typename Ty >
Ty galois::DGTerminator< Ty >::read ( )
inline

Read the value returned by the last reduce call.

Should call reduce before calling this function if an up to date value is required

Returns
the value of the last reduce call
template<typename Ty >
Ty galois::DGTerminator< Ty >::read_local ( )
inline

Read local accumulated value.

Returns
locally accumulated value
template<typename Ty >
Ty galois::DGTerminator< Ty >::reduce ( std::string  runID = std::string())
inline

Reduce data across all hosts, saves the value, and returns the reduced value.

Parameters
runIDoptional argument used to create a statistics timer for later reporting
Returns
The reduced value
template<typename Ty >
void galois::DGTerminator< Ty >::reinitialize ( )
inline
template<typename Ty >
Ty galois::DGTerminator< Ty >::reset ( )
inline

Reset the entire accumulator.

Returns
the value of the last reduce call
template<typename Ty >
void galois::DGTerminator< Ty >::set ( const Ty  rhs)
inline

Sets current value stored in accumulator.

Parameters
rhsValue to set
template<typename Ty >
bool galois::DGTerminator< Ty >::terminate ( )
inline

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