FreePOOMA  2.4.1
Public Member Functions | Static Public Member Functions
Reduction< MainEvaluatorTag > Struct Template Reference

This reduction is the one that gets called for a data-parallel expression. More...

#include <Reduction.h>

List of all members.

Public Member Functions

 Reduction ()
 ~Reduction ()
template<class T , class Op , class Cond , class Expr >
void evaluate (T &ret, const Op &op, const WhereProxy< Cond, Expr > &w) const
 Un-wrap where() expression operation and pass on to generic evaluator.
template<class T , class Op , class Expr >
void evaluate (T &ret, const Op &op, const Expr &e) const
 Input an expression and cause it to be reduced.

Static Public Member Functions

template<class Expr >
static bool checkValidity (const Expr &e, WrappedInt< false >)
 Helper to check validity of the expression, general version.
template<class Expr >
static bool checkValidity (const Expr &e, WrappedInt< true >)
 Helper to check validity of the expression, version for fields.

Detailed Description

template<>
struct Reduction< MainEvaluatorTag >

This reduction is the one that gets called for a data-parallel expression.

It just determines the appropriate reduction from the types of the LHS and RHS. We don't need to do a blockAndEvaluate() because all reductions naturally involve some sort of blocking using counting semaphores. This approach is superior to blockAndEvaluate() because iterates not related to the reduction can continue to execute out-of-order.


Constructor & Destructor Documentation


Member Function Documentation

template<class Expr >
static bool Reduction< MainEvaluatorTag >::checkValidity ( const Expr &  e,
WrappedInt< false >   
) [inline, static]

Helper to check validity of the expression, general version.

template<class Expr >
static bool Reduction< MainEvaluatorTag >::checkValidity ( const Expr &  e,
WrappedInt< true >   
) [inline, static]

Helper to check validity of the expression, version for fields.

template<class T , class Op , class Cond , class Expr >
void Reduction< MainEvaluatorTag >::evaluate ( T &  ret,
const Op &  op,
const WhereProxy< Cond, Expr > &  w 
) const [inline]

Un-wrap where() expression operation and pass on to generic evaluator.

References WhereProxy< F, B >::opMask(), and WhereProxy< F, B >::whereMask().

template<class T , class Op , class Expr >
void Reduction< MainEvaluatorTag >::evaluate ( T &  ret,
const Op &  op,
const Expr &  e 
) const [inline]

Input an expression and cause it to be reduced.

We just pass the buck to a special reduction after updating the expression leafs and checking its validity (we can handle one subfield only).

References forEach(), PAssert, and POOMA_INCREMENT_STATISTIC.


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