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

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

#include <DReducible.h>

Public Member Functions

 DGReduceMin ()
 Default constructor; initializes everything to the max value of the type. More...
 
void update (const Ty rhs)
 Update the local min-reduced value. More...
 
Ty read_local ()
 Read the local reduced min value; if it has never been reduced, it will attempt get the global value through a reduce (i.e. More...
 
Ty read ()
 Read the global reduced min value. More...
 
Ty reset ()
 Reset this accumulator. More...
 
Ty reduce (std::string runID=std::string())
 Do a min reduction across all hosts by sending data to all other hosts and reducing received data. More...
 

Detailed Description

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

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

Template Parameters
Tytype of value to min-reduce

Constructor & Destructor Documentation

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

Default constructor; initializes everything to the max value of the type.

Member Function Documentation

template<typename Ty >
Ty galois::DGReduceMin< Ty >::read ( )
inline

Read the global reduced min value.

For accurate results, you should call reduce before calling this.

Returns
the global value stored in the accumulator
template<typename Ty >
Ty galois::DGReduceMin< Ty >::read_local ( )
inline

Read the local reduced min value; if it has never been reduced, it will attempt get the global value through a reduce (i.e.

all other hosts should call reduce as well).

Returns
the local value stored in the accumulator or a global value if reduce has never been called
template<typename Ty >
Ty galois::DGReduceMin< Ty >::reduce ( std::string  runID = std::string())
inline

Do a min reduction across all hosts by sending data to all other hosts and reducing received data.

Returns
the min-reduced value after reducing from all hosts.
template<typename Ty >
Ty galois::DGReduceMin< Ty >::reset ( )
inline

Reset this accumulator.

Returns
the previous global value stored in this accumulator (note if never reduced, it will be 0
template<typename Ty >
void galois::DGReduceMin< Ty >::update ( const Ty  rhs)
inline

Update the local min-reduced value.

Parameters
rhsValue to min-reduce locally with

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