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) |
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.
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.
mapOverlapFunc | A pointer to a valid overlap user function. Will be deleted in the destructor. |
References skepu::Environment< T >::getInstance().
skepu::MapOverlap< MapOverlapFunc >::~MapOverlap | ( | ) |
When the MapOverlap skeleton is destroyed, it deletes the user function it was created with.
void skepu::MapOverlap< MapOverlapFunc >::CL | ( | Vector< T > & | input, |
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::CL | ( | Matrix< T > & | input, |
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A matrix which the mapping will be performed on. It will be overwritten with the result. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::CL | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
outputBegin | A Vector::iterator to the first element of the output range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::MapOverlap< MapOverlapFunc >::CL | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result and resized if needed. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
outputBegin | A Matrix::iterator to the first element of the output range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::MapOverlap< MapOverlapFunc >::CPU | ( | Vector< T > & | input, |
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::CPU | ( | Matrix< T > & | input, |
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A Matrix that is used for both input and output. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::CPU | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
outputBegin | A Vector::iterator to the first element of the output range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
void skepu::MapOverlap< MapOverlapFunc >::CPU | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result and resized if needed. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
outputBegin | A Matrix::iterator to the first element of the output range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
void skepu::MapOverlap< MapOverlapFunc >::CU | ( | Vector< T > & | input, |
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::CU | ( | Matrix< T > & | input, |
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A Matrix which the mapping will be performed on. It will be overwritten with the result. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::CU | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
outputBegin | A Vector::iterator to the first element of the output range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::max(), MAX_GPU_DEVICES, and skepu::min().
void skepu::MapOverlap< MapOverlapFunc >::CU | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A Matrix which the mapping will be performed on. |
output | The result Matrix, will be overwritten with the result and resized if needed. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
outputBegin | A Matrix::iterator to the first element of the output range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::MapOverlap< MapOverlapFunc >::OMP | ( | Vector< T > & | input, |
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
References skepu::Vector< T >::begin(), skepu::Vector< T >::clear(), and skepu::Vector< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::OMP | ( | Matrix< T > & | input, |
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A Matrix that is used for both input and output. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
References skepu::Matrix< T >::begin(), skepu::Matrix< T >::clear(), and skepu::Matrix< T >::resize().
void skepu::MapOverlap< MapOverlapFunc >::OMP | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
outputBegin | A Vector::iterator to the first element of the output range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
void skepu::MapOverlap< MapOverlapFunc >::OMP | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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).
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result and resized if needed. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
outputBegin | A Matrix::iterator to the first element of the output range. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
void skepu::MapOverlap< MapOverlapFunc >::operator() | ( | Vector< T > & | input, |
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
void skepu::MapOverlap< MapOverlapFunc >::operator() | ( | Matrix< T > & | input, |
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A matrix which the mapping will be performed on. It will be overwritten with the result. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
void skepu::MapOverlap< MapOverlapFunc >::operator() | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If 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().
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.
inputBegin | A Vector::iterator to the first element in the range. |
inputEnd | A Vector::iterator to the last element of the range. |
outputBegin | A Vector::iterator to the first element of the output range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
void skepu::MapOverlap< MapOverlapFunc >::operator() | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
OverlapPolicy | overlapPolicy, | ||
EdgePolicy | poly = CONSTANT , |
||
T | 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.
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result and resized if needed. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |
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.
inputBegin | A Matrix::iterator to the first element in the range. |
inputEnd | A Matrix::iterator to the last element of the range. |
outputBegin | A Matrix::iterator to the first element of the output range. |
poly | Edge policy for the calculation, either CONSTANT or CYCLIC. |
pad | If CONSTANT edge policy, this is the value to pad with. |
overlapPolicy | Specify how to apply overlap either row-wise, column-wise or both. |