SkePU  1.2
 All Classes Namespaces Files Functions Variables Enumerations Friends Macros Groups Pages
Public Member Functions | List of all members
skepu::MapOverlap< MapOverlapFunc > Class Template Reference

A class representing the MapOverlap skeleton. More...

#include <mapoverlap.h>

Public Member Functions

 MapOverlap (MapOverlapFunc *mapOverlapFunc)
 
 ~MapOverlap ()
 
template<typename T >
void operator() (Vector< T > &input, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator >
void operator() (InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void operator() (Matrix< T > &input, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator >
void operator() (InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void operator() (Vector< T > &input, Vector< T > &output, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator , typename OutputIterator >
void operator() (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void operator() (Matrix< T > &input, Matrix< T > &output, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator , typename OutputIterator >
void operator() (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void CPU (Vector< T > &input, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator >
void CPU (InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void CPU (Matrix< T > &input, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator >
void CPU (InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void CPU (Vector< T > &input, Vector< T > &output, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator , typename OutputIterator >
void CPU (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void CPU (Matrix< T > &input, Matrix< T > &output, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator , typename OutputIterator >
void CPU (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void OMP (Vector< T > &input, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator >
void OMP (InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void OMP (Matrix< T > &input, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator >
void OMP (InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void OMP (Vector< T > &input, Vector< T > &output, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator , typename OutputIterator >
void OMP (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void OMP (Matrix< T > &input, Matrix< T > &output, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T())
 
template<typename InputIterator , typename OutputIterator >
void OMP (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type())
 
template<typename T >
void CU (Vector< T > &input, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator >
void CU (InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CU (Matrix< T > &input, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator >
void CU (InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CU (Vector< T > &input, Vector< T > &output, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator , typename OutputIterator >
void CU (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CU (Matrix< T > &input, Matrix< T > &output, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator , typename OutputIterator >
void CU (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CL (Vector< T > &input, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator >
void CL (InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CL (Matrix< T > &input, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator >
void CL (InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CL (Vector< T > &input, Vector< T > &output, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator , typename OutputIterator >
void CL (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 
template<typename T >
void CL (Matrix< T > &input, Matrix< T > &output, OverlapPolicy overlapPolicy, EdgePolicy poly=CONSTANT, T pad=T(), int useNumGPU=1)
 
template<typename InputIterator , typename OutputIterator >
void CL (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad=typename InputIterator::value_type(), int useNumGPU=1)
 

Detailed Description

template<typename MapOverlapFunc>
class skepu::MapOverlap< MapOverlapFunc >

A class representing the MapOverlap skeleton.

This class defines the MapOverlap skeleton which is similar to a Map, but each element of the result (vecor/matrix) is a function of several adjacent elements of one input (vecor/matrix) that reside at a certain constant maximum distance from each other. This class can be used to apply (1) overlap to a vector and (2) separable-overlap to a matrix (row-wise, column-wise). For non-separable matrix overlap which considers diagonal neighbours as well besides row- and column-wise neighbours, please see src/MapOverlap2D. MapOverlap2D class can be used by including same header file (i.e., mapoverlap.h) but class name is different (MapOverlap2D).

Once instantiated, it is meant to be used as a function and therefore overloading operator(). There are a few overloaded variants of this operator depending on if a seperate output vector is provided or if vectors or iterators are used as parameters.

If a certain backend is to be used, functions with the same interface as operator() but by the names CPU, CU, CL, OMP exists for CPU, CUDA, OpenCL and OpenMP respectively.

The MapOverlap skeleton also includes a pointer to an Environment which includes the devices available to execute on.

Constructor & Destructor Documentation

template<typename MapOverlapFunc >
skepu::MapOverlap< MapOverlapFunc >::MapOverlap ( MapOverlapFunc *  mapOverlapFunc)

When creating an instance of the MapOverlap skeleton, a pointer to an overlap user function must be provided. Also the environment is set and if SKEPU_OPENCL is defined, the appropriate OpenCL program and kernel are created. Also creates a default execution plan which the skeleton will use if no other is specified.

Parameters
mapOverlapFuncA pointer to a valid overlap user function. Will be deleted in the destructor.

References skepu::Environment< T >::getInstance().

Here is the call graph for this function:

template<typename MapOverlapFunc >
skepu::MapOverlap< MapOverlapFunc >::~MapOverlap ( )

When the MapOverlap skeleton is destroyed, it deletes the user function it was created with.

Member Function Documentation

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CL ( Vector< T > &  input,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Vector. With itself as output. A wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using OpenCL as backend.

Parameters
inputA vector which the mapping will be performed on. It will be overwritten with the result.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CL ( InputIterator  inputBegin,
InputIterator  inputEnd,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With the same range as output. Since a seperate output is needed, a temporary output vector is created and copied to the input vector at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead. Using OpenCL as backend.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CL ( Matrix< T > &  input,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Matrix. With itself as output. A wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using OpenCL as backend.

Parameters
inputA matrix which the mapping will be performed on. It will be overwritten with the result.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CL ( InputIterator  inputBegin,
InputIterator  inputEnd,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With the same range as output. Since a seperate output is needed, a temporary output matrix is created and copied to the input matrix at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead. Using OpenCL as backend.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CL ( Vector< T > &  input,
Vector< T > &  output,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Vector. With a seperate output vector. Wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using OpenCL as backend.

Parameters
inputA vector which the mapping will be performed on.
outputThe result vector, will be overwritten with the result and resized if needed.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), skepu::Vector< T >::end(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CL ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With a seperate output range. The function decides whether to perform the MapOverlap on one device, calling mapOverlapSingle_CL or on multiple devices, calling mapOverlapNumDevices_CL. Using OpenCL as backend.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
outputBeginA Vector::iterator to the first element of the output range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CL ( Matrix< T > &  input,
Matrix< T > &  output,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Matrix. With a seperate output matrix. Wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using OpenCL as backend.

Parameters
inputA matrix which the mapping will be performed on.
outputThe result matrix, will be overwritten with the result and resized if needed.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CL ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With a seperate output range. The function decides whether to perform the MapOverlap on one device, calling mapOverlapSingle_CL or on multiple devices, calling mapOverlapNumDevices_CL. Using OpenCL as backend.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
outputBeginA Matrix::iterator to the first element of the output range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( Vector< T > &  input,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Vector on the CPU with itself as output. A wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA vector which the mapping will be performed on. It will be overwritten with the result.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().

Referenced by skepu::cpu_tune_wrapper_mapoverlap().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( InputIterator  inputBegin,
InputIterator  inputEnd,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements on the CPU with the same range as output. Since a seperate output is needed, a temporary output vector is created and copied to the input vector at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( Matrix< T > &  input,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a Matrix on the CPU with the same Matrix as output. Wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA Matrix that is used for both input and output.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( InputIterator  inputBegin,
InputIterator  inputEnd,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of matrix elements on the CPU with the same range as output. Since a seperate output is needed, a temporary output matrix is created and copied to the input matrix at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( Vector< T > &  input,
Vector< T > &  output,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Vector on the CPU with a seperate output vector. Wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA vector which the mapping will be performed on.
outputThe result vector, will be overwritten with the result and resized if needed.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), skepu::Vector< T >::end(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements on the CPU with a seperate output range.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
outputBeginA Vector::iterator to the first element of the output range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( Matrix< T > &  input,
Matrix< T > &  output,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole matrix on the CPU with a seperate output matrix. Wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA matrix which the mapping will be performed on.
outputThe result matrix, will be overwritten with the result and resized if needed.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CPU ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of matrix elements on the CPU with a seperate output range.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
outputBeginA Matrix::iterator to the first element of the output range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CU ( Vector< T > &  input,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Vector. With itself as output. A wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using CUDA as backend.

Parameters
inputA vector which the mapping will be performed on. It will be overwritten with the result.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().

Referenced by skepu::cuda_tune_wrapper_mapoverlap().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CU ( InputIterator  inputBegin,
InputIterator  inputEnd,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With the same range as output. Since a seperate output is needed, a temporary output vector is created and copied to the input vector at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead. Using CUDA as backend.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CU ( Matrix< T > &  input,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Matrix. With itself as output. A wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using CUDA as backend.

Parameters
inputA Matrix which the mapping will be performed on. It will be overwritten with the result.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CU ( InputIterator  inputBegin,
InputIterator  inputEnd,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With the same range as output. Since a seperate output is needed, a temporary output matrix is created and copied to the input matrix at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead. Using CUDA as backend.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CU ( Vector< T > &  input,
Vector< T > &  output,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Vector. With a seperate output vector. Wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using CUDA as backend.

Parameters
inputA vector which the mapping will be performed on.
outputThe result vector, will be overwritten with the result and resized if needed.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), skepu::Vector< T >::end(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CU ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With a seperate output range. Decides whether to use one device and mapOverlapSingleThread_CU or multiple devices and create new threads which calls mapOverlapThreadFunc_CU. In the case of several devices the input range is divided evenly among the threads created. Using CUDA as backend.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
outputBeginA Vector::iterator to the first element of the output range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.

References skepu::max(), MAX_GPU_DEVICES, and skepu::min().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::CU ( Matrix< T > &  input,
Matrix< T > &  output,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a whole Matrix. With a seperate output matrix. Wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad, int useNumGPU). Using CUDA as backend.

Parameters
inputA Matrix which the mapping will be performed on.
outputThe result Matrix, will be overwritten with the result and resized if needed.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::CU ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type(),
int  useNumGPU = 1 
)

Performs the MapOverlap on a range of elements. With a seperate output range. Decides whether to use one device or multiple devices In the case of several devices the input range is divided evenly among the multiple devices. Using CUDA as backend.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
outputBeginA Matrix::iterator to the first element of the output range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
useNumGPUInteger specifying how many devices to use. 0 = Implementation decides.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( Vector< T > &  input,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Vector using OpenMP as backend and itself as output. A wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA vector which the mapping will be performed on. It will be overwritten with the result.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().

Referenced by skepu::omp_tune_wrapper_mapoverlap().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( InputIterator  inputBegin,
InputIterator  inputEnd,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements using OpenMP as backend and the same range as output. Since a seperate output is needed, a temporary output vector is created and copied to the input vector at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( Matrix< T > &  input,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a Matrix on the OpenMP with the same Matrix as output. Wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA Matrix that is used for both input and output.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( InputIterator  inputBegin,
InputIterator  inputEnd,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements on the OpenMP with the same range as output. Since a seperate output is needed, a temporary output matrix is created and copied to the input matrix at the end. This is rather inefficient and the two functions using a seperated output explicitly should be used instead.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( Vector< T > &  input,
Vector< T > &  output,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Vector using OpenMP as backend and a seperate output vector. Wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA vector which the mapping will be performed on.
outputThe result vector, will be overwritten with the result and resized if needed.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), skepu::Vector< T >::end(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements using OpenMP as backend and a seperate output range.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
outputBeginA Vector::iterator to the first element of the output range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( Matrix< T > &  input,
Matrix< T > &  output,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Matrix on the OpenMP with a seperate output Matrix. Wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, OverlapPolicy overlapPolicy, EdgePolicy poly, typename InputIterator::value_type pad).

Parameters
inputA matrix which the mapping will be performed on.
outputThe result matrix, will be overwritten with the result and resized if needed.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::OMP ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements on the OpenMP with a seperate output range.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
outputBeginA Matrix::iterator to the first element of the output range.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( Vector< T > &  input,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Vector. With itself as output.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputA vector which the mapping will be performed on. It will be overwritten with the result.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::isModified_CU(), skepu::Vector< T >::isVectorOnDevice_CU(), and skepu::Vector< T >::size().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( InputIterator  inputBegin,
InputIterator  inputEnd,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements. With the same range as output.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( Matrix< T > &  input,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Matrix. With itself as output.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputA matrix which the mapping will be performed on. It will be overwritten with the result.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
template<typename MapOverlapFunc >
template<typename InputIterator >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( InputIterator  inputBegin,
InputIterator  inputEnd,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements. With the same range as output.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( Vector< T > &  input,
Vector< T > &  output,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Vector. With a seperate Vector as output.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputA vector which the mapping will be performed on.
outputThe result vector, will be overwritten with the result and resized if needed.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.

References skepu::Vector< T >::isModified_CU(), skepu::Vector< T >::isVectorOnDevice_CU(), and skepu::Vector< T >::size().

Here is the call graph for this function:

template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
EdgePolicy  poly,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements. With a seperate output range.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputBeginA Vector::iterator to the first element in the range.
inputEndA Vector::iterator to the last element of the range.
outputBeginA Vector::iterator to the first element of the output range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
template<typename MapOverlapFunc >
template<typename T >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( Matrix< T > &  input,
Matrix< T > &  output,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
pad = T() 
)

Performs the MapOverlap on a whole Matrix. With a seperate Matrix as output.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputA matrix which the mapping will be performed on.
outputThe result matrix, will be overwritten with the result and resized if needed.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.
template<typename MapOverlapFunc >
template<typename InputIterator , typename OutputIterator >
void skepu::MapOverlap< MapOverlapFunc >::operator() ( InputIterator  inputBegin,
InputIterator  inputEnd,
OutputIterator  outputBegin,
OverlapPolicy  overlapPolicy,
EdgePolicy  poly = CONSTANT,
typename InputIterator::value_type  pad = typename InputIterator::value_type() 
)

Performs the MapOverlap on a range of elements. With a seperate output range.

Depending on which backend was used, different versions of the skeleton is called. If SKEPU_CUDA is defined, the CUDA backend is used, similarly if SKEPU_OPENCL or SKEPU_OPENMP are defined then the OpenCL or OpenMP backend is used. As a fallback there is always a CPU version.

Parameters
inputBeginA Matrix::iterator to the first element in the range.
inputEndA Matrix::iterator to the last element of the range.
outputBeginA Matrix::iterator to the first element of the output range.
polyEdge policy for the calculation, either CONSTANT or CYCLIC.
padIf CONSTANT edge policy, this is the value to pad with.
overlapPolicySpecify how to apply overlap either row-wise, column-wise or both.

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