SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
SimpleReducer Class Reference

#include <SimpleReducer.h>

Inheritance diagram for SimpleReducer:
Barrier

Public Member Functions

 SimpleReducer (const char *name)
 
virtual ~SimpleReducer ()
 Destroy the SimpleReducer and free associated memory. More...
 
double sum (int myrank, int numThreads, double mysum)
 
double max (int myrank, int numThreads, double mymax)
 
double min (int myrank, int numThreads, double mymax)
 
- Public Member Functions inherited from Barrier
 Barrier (const char *name)
 
virtual ~Barrier ()
 Destroy the barrier. More...
 
void wait (int numThreads)
 

Constructor & Destructor Documentation

SimpleReducer ( const char *  name)

Create a SimpleReducer. At each operation, a barrier wait is performed, and the operation will be performed to compute the global balue. name should be a static string which describes the primitive for debugging purposes.

virtual ~SimpleReducer ( )
virtual

Destroy the SimpleReducer and free associated memory.

Member Function Documentation

double max ( int  myrank,
int  numThreads,
double  mymax 
)

Performs a global max over all of the threads. As soon as each thread has called max with their local max, each thread will return the same global max.

double min ( int  myrank,
int  numThreads,
double  mymax 
)

Performs a global min over all of the threads. As soon as each thread has called min with their local max, each thread will return the same global max.

double sum ( int  myrank,
int  numThreads,
double  mysum 
)

Performs a global sum over all of the threads. As soon as each thread has called sum with their local sum, each thread will return the same global sum.


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