SkelCL
SkelCL is a high level multi GPU skeleton library developed at the university of Münster, Germany.
 All Classes Namespaces Files Functions Variables Typedefs Groups
Public Member Functions | List of all members
skelcl::Scan< T(T)> Class Template Reference

An instance of the Reduce class describes a scan (a.k.a. prefix sum) calculation customized by a given binary user-defined function. More...

#include <Scan.h>

Inheritance diagram for skelcl::Scan< T(T)>:

Public Member Functions

 Scan (const Source &source, const std::string &id="0", const std::string &funcName=std::string("func"))
 Constructor taking the source code to customize the Scan skeleton. More...
 
template<typename... Args>
Vector< T > operator() (const Vector< T > &input, Args &&...args)
 Function call operator. Executes the skeleton on the data provided as argument input and args. The resulting data is returned as a moved copy. More...
 
template<typename... Args>
Vector< T > & operator() (Out< Vector< T >> output, const Vector< T > &input, Args &&...args)
 Function call operator. Executes the skeleton on the data provided as argument input and args. The resulting data is stored in the provided Vector output. A reference to the output Vector is returned to allow for chaining skeleton calls. More...
 

Detailed Description

template<typename T>
class skelcl::Scan< T(T)>

An instance of the Reduce class describes a scan (a.k.a. prefix sum) calculation customized by a given binary user-defined function.

Template Parameters
TType of the input and output data of the skeleton.

Definition at line 81 of file Scan.h.

Constructor & Destructor Documentation

template<typename T >
skelcl::Scan< T(T)>::Scan ( const Source source,
const std::string &  id = "0",
const std::string &  funcName = std::string("func") 
)

Constructor taking the source code to customize the Scan skeleton.

Parameters
sourceSource code used to customize the skeleton.
idIdentity for he function named by funcName and defined in source. Meaning: if func is the name of the function defined in source, func(x, id) = x and func(id, x) = x for every possible value of x
funcNameName of the 'main' function (the starting point) of the given source code

Member Function Documentation

template<typename T >
template<typename... Args>
Vector<T> skelcl::Scan< T(T)>::operator() ( const Vector< T > &  input,
Args &&...  args 
)

Function call operator. Executes the skeleton on the data provided as argument input and args. The resulting data is returned as a moved copy.

Parameters
inputThe input data for the skeleton managed inside a Vector. If no distribution is set the Single distribution using the device with id 0 is used. Currently only the Single distribution is supported for the input Vector! This will certainly be advanced in a future version.
argsAdditional arguments which are passed to the function named by funcName and defined in the source code at created. The individual arguments must be passed in the same order here as they where defined in the funcName function declaration.
template<typename T >
template<typename... Args>
Vector<T>& skelcl::Scan< T(T)>::operator() ( Out< Vector< T >>  output,
const Vector< T > &  input,
Args &&...  args 
)

Function call operator. Executes the skeleton on the data provided as argument input and args. The resulting data is stored in the provided Vector output. A reference to the output Vector is returned to allow for chaining skeleton calls.

Parameters
outputThe Vector storing the result of the execution of the skeleton. A reference to this container is also returned. The Vector might be resized to fit the result. The distribution of the container might change.
inputThe input data for the skeleton managed inside a Vector. If no distribution is set the Single distribution using the device with id 0 is used. Currently only the Single distribution is supported for the input Vector! This will certainly be advanced in a future version.
argsAdditional arguments which are passed to the function named by funcName and defined in the source code at created. The individual arguments must be passed in the same order here as they where defined in the funcName function declaration.

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