Galois::GReducible< T, BinFunc > Class Template Reference
GReducible stores per thread values of a variable of type T.
More...
#include <Accumulator.h>
List of all members.
Public Member Functions |
| GReducible (const T &val) |
| GReducible (BinFunc F) |
| GReducible (const T val, BinFunc F) |
| GReducible () |
const T & | update (const T &_newVal) |
| updates the thread local value by applying the reduction operator to current and newly provided value
|
T & | get () |
| returns the thread local value if in a parallel loop or the final reduction if in serial mode
|
void | reset (const T &d) |
| reset thread local value to the arg provided
|
Private Member Functions |
void | reduce () |
virtual void | ThreadChange (bool starting) |
Private Attributes |
BinFunc | _func |
GaloisRuntime::PerCPU< T > | _data |
Detailed Description
template<typename T, typename BinFunc>
class Galois::GReducible< T, BinFunc >
GReducible stores per thread values of a variable of type T.
At the end of a for_each section, the final value is obtained by performing a reduction on per thread values using the provided binary functor BinFunc
Constructor & Destructor Documentation
template<typename T, typename BinFunc>
- Parameters:
-
| val | initial per thread value |
template<typename T, typename BinFunc>
- Parameters:
-
| F | the binary functor acting as the reduction operator |
template<typename T, typename BinFunc>
- Parameters:
-
| val | initial per thread value |
| F | the binary functor acting as the reduction operator |
template<typename T, typename BinFunc>
Member Function Documentation
template<typename T, typename BinFunc>
returns the thread local value if in a parallel loop or the final reduction if in serial mode
template<typename T, typename BinFunc>
template<typename T, typename BinFunc>
reset thread local value to the arg provided
- Parameters:
-
template<typename T, typename BinFunc>
virtual void Galois::GReducible< T, BinFunc >::ThreadChange |
( |
bool |
starting |
) |
[inline, private, virtual] |
template<typename T, typename BinFunc>
updates the thread local value by applying the reduction operator to current and newly provided value
- Parameters:
-
Member Data Documentation
template<typename T, typename BinFunc>
template<typename T, typename BinFunc>
The documentation for this class was generated from the following file: