VexCL
Public Member Functions | List of all members
vex::Reductor< real, RDC > Class Template Reference

Parallel reduction of arbitrary expression. More...

#include <reduce.hpp>

Public Member Functions

 Reductor (const std::vector< cl::CommandQueue > &queue=current_context().queue())
 Constructor.
 
template<class Expr >
std::enable_if
< boost::proto::matches< Expr,
vector_expr_grammar >::value,
real >::type 
operator() (const Expr &expr) const
 Compute reduction of the input expression. More...
 

Detailed Description

template<typename real, class RDC>
class vex::Reductor< real, RDC >

Parallel reduction of arbitrary expression.

Reduction uses small temporary buffer on each device present in the queue parameter. One Reductor class for each reduction kind is enough per thread of execution.

Member Function Documentation

template<typename real , class RDC >
template<class Expr >
std::enable_if< boost::proto::matches< Expr, vector_expr_grammar >::value, real >::type vex::Reductor< real, RDC >::operator() ( const Expr &  expr) const

Compute reduction of the input expression.

The input expression may be as simple as a single vector, although expressions of arbitrary complexity may be reduced.


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