A class representing the Map skeleton. More...
#include <map.h>
Public Member Functions | |
Map (MapFunc *mapFunc) | |
~Map () | |
template<typename U > | |
void | setConstant (U constant1) |
void | finishAll () |
template<typename T > | |
void | operator() (Vector< T > &input) |
template<typename T > | |
void | operator() (Vector< T > &input, Vector< T > &output, int groupId=-1) |
template<typename T > | |
void | operator() (Matrix< T > &input) |
template<typename T > | |
void | operator() (Matrix< T > &input, Matrix< T > &output) |
template<typename InputIterator > | |
void | operator() (InputIterator inputBegin, InputIterator inputEnd) |
template<typename InputIterator , typename OutputIterator > | |
void | operator() (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin) |
template<typename T > | |
void | operator() (Vector< T > &input1, Vector< T > &input2, Vector< T > &output) |
template<typename T > | |
void | operator() (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &output) |
template<typename Input1Iterator , typename Input2Iterator , typename OutputIterator > | |
void | operator() (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin) |
template<typename T > | |
void | operator() (Vector< T > &input1, Vector< T > &input2, Vector< T > &input3, Vector< T > &output) |
template<typename T > | |
void | operator() (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &input3, Matrix< T > &output) |
template<typename Input1Iterator , typename Input2Iterator , typename Input3Iterator , typename OutputIterator > | |
void | operator() (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin) |
template<typename T > | |
void | operator() (SparseMatrix< T > &input) |
template<typename T > | |
void | operator() (SparseMatrix< T > &input, SparseMatrix< T > &output) |
template<typename T > | |
void | operator() (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &output) |
template<typename T > | |
void | operator() (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &input3, SparseMatrix< T > &output) |
template<typename T > | |
void | CPU (Vector< T > &input) |
template<typename T > | |
void | CPU (Vector< T > &input, Vector< T > &output) |
template<typename T > | |
void | CPU (Matrix< T > &input) |
template<typename T > | |
void | CPU (Matrix< T > &input, Matrix< T > &output) |
template<typename InputIterator > | |
void | CPU (InputIterator inputBegin, InputIterator inputEnd) |
template<typename InputIterator , typename OutputIterator > | |
void | CPU (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin) |
template<typename T > | |
void | CPU (Vector< T > &input1, Vector< T > &input2, Vector< T > &output) |
template<typename T > | |
void | CPU (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &output) |
template<typename Input1Iterator , typename Input2Iterator , typename OutputIterator > | |
void | CPU (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin) |
template<typename T > | |
void | CPU (Vector< T > &input1, Vector< T > &input2, Vector< T > &input3, Vector< T > &output) |
template<typename T > | |
void | CPU (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &input3, Matrix< T > &output) |
template<typename Input1Iterator , typename Input2Iterator , typename Input3Iterator , typename OutputIterator > | |
void | CPU (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin) |
template<typename T > | |
void | CPU (SparseMatrix< T > &input) |
template<typename T > | |
void | CPU (SparseMatrix< T > &input, SparseMatrix< T > &output) |
template<typename T > | |
void | CPU (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &output) |
template<typename T > | |
void | CPU (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &input3, SparseMatrix< T > &output) |
template<typename T > | |
void | OMP (Vector< T > &input) |
template<typename T > | |
void | OMP (Vector< T > &input, Vector< T > &output) |
template<typename T > | |
void | OMP (Matrix< T > &input) |
template<typename T > | |
void | OMP (Matrix< T > &input, Matrix< T > &output) |
template<typename InputIterator > | |
void | OMP (InputIterator inputBegin, InputIterator inputEnd) |
template<typename InputIterator , typename OutputIterator > | |
void | OMP (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin) |
template<typename T > | |
void | OMP (Vector< T > &input1, Vector< T > &input2, Vector< T > &output) |
template<typename T > | |
void | OMP (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &output) |
template<typename Input1Iterator , typename Input2Iterator , typename OutputIterator > | |
void | OMP (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin) |
template<typename T > | |
void | OMP (Vector< T > &input1, Vector< T > &input2, Vector< T > &input3, Vector< T > &output) |
template<typename T > | |
void | OMP (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &input3, Matrix< T > &output) |
template<typename Input1Iterator , typename Input2Iterator , typename Input3Iterator , typename OutputIterator > | |
void | OMP (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin) |
template<typename T > | |
void | OMP (SparseMatrix< T > &input) |
template<typename T > | |
void | OMP (SparseMatrix< T > &input, SparseMatrix< T > &output) |
template<typename T > | |
void | OMP (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &output) |
template<typename T > | |
void | OMP (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &input3, SparseMatrix< T > &output) |
template<typename T > | |
void | CU (Vector< T > &input, int useNumGPU=1) |
template<typename T > | |
void | CU (Vector< T > &input, Vector< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CU (Matrix< T > &input, int useNumGPU=1) |
template<typename T > | |
void | CU (Matrix< T > &input, Matrix< T > &output, int useNumGPU=1) |
template<typename InputIterator > | |
void | CU (InputIterator inputBegin, InputIterator inputEnd, int useNumGPU=1) |
template<typename InputIterator , typename OutputIterator > | |
void | CU (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU=1) |
template<typename T > | |
void | CU (Vector< T > &input1, Vector< T > &input2, Vector< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CU (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &output, int useNumGPU=1) |
template<typename Input1Iterator , typename Input2Iterator , typename OutputIterator > | |
void | CU (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int useNumGPU=1) |
template<typename T > | |
void | CU (Vector< T > &input1, Vector< T > &input2, Vector< T > &input3, Vector< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CU (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &input3, Matrix< T > &output, int useNumGPU=1) |
template<typename Input1Iterator , typename Input2Iterator , typename Input3Iterator , typename OutputIterator > | |
void | CU (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU=1) |
template<typename T > | |
void | CU (SparseMatrix< T > &input, int useNumGPU=1) |
template<typename T > | |
void | CU (SparseMatrix< T > &input, SparseMatrix< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CU (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CU (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &input3, SparseMatrix< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CL (Vector< T > &input, int useNumGPU=1) |
template<typename T > | |
void | CL (Vector< T > &input, Vector< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CL (Matrix< T > &input, int useNumGPU=1) |
template<typename T > | |
void | CL (Matrix< T > &input, Matrix< T > &output, int useNumGPU=1) |
template<typename InputIterator > | |
void | CL (InputIterator inputBegin, InputIterator inputEnd, int useNumGPU=1) |
template<typename InputIterator , typename OutputIterator > | |
void | CL (InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU=1) |
template<typename T > | |
void | CL (Vector< T > &input1, Vector< T > &input2, Vector< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CL (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &output, int useNumGPU=1) |
template<typename Input1Iterator , typename Input2Iterator , typename OutputIterator > | |
void | CL (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int useNumGPU=1) |
template<typename T > | |
void | CL (Vector< T > &input1, Vector< T > &input2, Vector< T > &input3, Vector< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CL (Matrix< T > &input1, Matrix< T > &input2, Matrix< T > &input3, Matrix< T > &output, int useNumGPU=1) |
template<typename Input1Iterator , typename Input2Iterator , typename Input3Iterator , typename OutputIterator > | |
void | CL (Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU=1) |
template<typename T > | |
void | CL (SparseMatrix< T > &input, int useNumGPU=1) |
template<typename T > | |
void | CL (SparseMatrix< T > &input, SparseMatrix< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CL (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &output, int useNumGPU=1) |
template<typename T > | |
void | CL (SparseMatrix< T > &input1, SparseMatrix< T > &input2, SparseMatrix< T > &input3, SparseMatrix< T > &output, int useNumGPU=1) |
template<typename Input1Iterator , typename OutputIterator > | |
void | mapMultiStream_CU (Input1Iterator input1Begin, Input1Iterator input1End, OutputIterator outputBegin, unsigned int deviceID) |
A class representing the Map skeleton.
This class defines the Map skeleton, a calculation pattern where a user function is applied to each element of an input range. Once the Map object is instantiated, it is meant to be used as a function and therefore overloading operator()
. There are several overloaded versions of this operator that can be used depending on how many elements the mapping function uses (one, two or three). There are also variants which takes iterators as inputs and those that takes whole containers (vectors, matrices). The container variants are merely wrappers for the functions which takes iterators 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 Map skeleton also includes a pointer to an Environment which includes the devices available to execute on.
skepu::Map< MapFunc >::Map | ( | MapFunc * | mapFunc | ) |
When creating an instance of the Map skeleton, a pointer to a unary, binary or trinary user function must be provided. Also the environment is set and if SKEPU_OPENCL
is defined, the appropriate OpenCL program and kernel are created.
mapFunc | A pointer to a valid user function. Will be deleted in the destructor. |
References skepu::Environment< T >::getInstance().
skepu::Map< MapFunc >::~Map | ( | ) |
When the Map skeleton is destroyed, it deletes the user function it was created with.
void skepu::Map< MapFunc >::CL | ( | Vector< T > & | input, |
int | useNumGPU = 1 |
||
) |
Performs mapping on one vector with OpenCL backend. Input is used as output. The Map skeleton needs to be created with a unary user function. The function is a wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CL | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on one vector with OpenCL as backend. Seperate output vector is used. The Map skeleton needs to be created with a unary user function. The function is a wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
output | The result vector, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CL | ( | Matrix< T > & | input, |
int | useNumGPU = 1 |
||
) |
Performs mapping on one matrix with OpenCL backend. Input is used as output. The Map skeleton needs to be created with a unary user function. The function is a wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A matrix which the mapping will be performed on. It will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on one matrix with OpenCL as backend. Seperate output matrix is used. The Map skeleton needs to be created with a unary user function. The function is a wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A matrix which the mapping will be performed on. It will be overwritten with the result. |
output | The result matrix, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on one element range with OpenCL as backend. Input is used as output. The Map skeleton needs to be created with a unary user function. The function is a wrapper for CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
OutputIterator | outputBegin, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on one element range with OpenCL as backend. Seperate output range. The Map skeleton needs to be created with a unary user function. Calls mapNumDevices_CL(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int numDevices).
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
outputBegin | An iterator to the first element of the output range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on two vectors with OpenCL as backend. Seperate output vector. The Map skeleton needs to be created with a binary user function. The function is a wrapper for CL(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int useNumGPU).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CL | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on two matrices with OpenCL as backend. Seperate output matrix. The Map skeleton needs to be created with a binary user function. The function is a wrapper for CL(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int useNumGPU).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
OutputIterator | outputBegin, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on two element ranges with OpenCL as backend. Seperate output range. The Map skeleton needs to be created with a binary user function. Calls mapNumDevices_CL(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int numDevices).
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
outputBegin | An iterator to the first element of the output range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | input3, | ||
Vector< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on three vectors with OpenCL as backend. Seperate output vector. The Map skeleton needs to be created with a trinary user function. The function is a wrapper for CL(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
input3 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CL | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | input3, | ||
Matrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on three matrices with OpenCL as backend. Seperate output matrix. The Map skeleton needs to be created with a trinary user function. The function is a wrapper for CL(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
input3 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
Input3Iterator | input3Begin, | ||
Input3Iterator | input3End, | ||
OutputIterator | outputBegin, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on three element ranges with OpenCL as backend. Seperate output range. The Map skeleton needs to be created with a trinary user function. Calls mapNumDevices_CL(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU).
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
input3Begin | An iterator to the first element in the third range. |
input3End | An iterator to the last element of the third range. |
outputBegin | An iterator to the first element of the output range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CL | ( | SparseMatrix< T > & | input, |
int | useNumGPU = 1 |
||
) |
Performs mapping on one sparse matrix on the OpenCL. Input is used as output.
input | A sparse matrix which the mapping will be performed on. It will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
void skepu::Map< MapFunc >::CL | ( | SparseMatrix< T > & | input, |
SparseMatrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping with one sparse matrix on the OpenCL. Seperate output is used.
input | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
References skepu::DeviceMemPointer_CL< T >::changeDeviceData(), skepu::SparseMatrix< T >::get_values(), skepu::DeviceMemPointer_CL< T >::getDeviceDataPointer(), skepu::max(), MAX_GPU_DEVICES, skepu::min(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateDevice_CL().
void skepu::Map< MapFunc >::CL | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping with two sparse matrices as input on the OpenCL. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
References skepu::DeviceMemPointer_CL< T >::changeDeviceData(), skepu::SparseMatrix< T >::get_values(), skepu::DeviceMemPointer_CL< T >::getDeviceDataPointer(), skepu::max(), MAX_GPU_DEVICES, skepu::min(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateDevice_CL().
void skepu::Map< MapFunc >::CL | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | input3, | ||
SparseMatrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping with two sparse matrices as input on the OpenCL. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
input3 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
References skepu::DeviceMemPointer_CL< T >::changeDeviceData(), skepu::SparseMatrix< T >::get_values(), skepu::DeviceMemPointer_CL< T >::getDeviceDataPointer(), skepu::max(), MAX_GPU_DEVICES, skepu::min(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateDevice_CL().
void skepu::Map< MapFunc >::CPU | ( | Vector< T > & | input | ) |
Performs mapping on one vector on the CPU. Input is used as output. The function is a wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
Referenced by skepu::cpu_tune_wrapper_map().
void skepu::Map< MapFunc >::CPU | ( | Vector< T > & | input, |
Vector< T > & | output | ||
) |
Performs mapping with one vector on the CPU. Seperate output is used. The function is a wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CPU | ( | Matrix< T > & | input | ) |
Performs mapping on one matrix on the CPU. Input is used as output. The function is a wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd).
input | A matrix which the mapping will be performed on. It will be overwritten with the result. |
void skepu::Map< MapFunc >::CPU | ( | Matrix< T > & | input, |
Matrix< T > & | output | ||
) |
Performs mapping with one matrix on the CPU. Seperate output is used. The function is a wrapper for CPU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
void skepu::Map< MapFunc >::CPU | ( | InputIterator | inputBegin, |
InputIterator | inputEnd | ||
) |
Performs the Map with one element range on the CPU. Input is used as output. The Map skeleton needs to be created with a unary user function. The computation is done by iterating over all the elements in the range and applying the user function on each of them.
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
void skepu::Map< MapFunc >::CPU | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map with one element range on the CPU. Seperate output range is used. The Map skeleton needs to be created with a unary user function. The computation is done by iterating over all the elements in the range and applying the user function on each of them.
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::CPU | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | output | ||
) |
Performs mapping with two vectors on the CPU. Seperate output is used. The function is a wrapper for CPU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CPU | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | output | ||
) |
Performs mapping with two matrices on the CPU. Seperate output is used. The function is a wrapper for CPU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
void skepu::Map< MapFunc >::CPU | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map with two element ranges on the CPU. Seperate output range is used. The Map skeleton needs to be created with a binary user function. The computation is done by iterating over all the elements in the ranges and applying the user function on each of them.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::CPU | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | input3, | ||
Vector< T > & | output | ||
) |
Performs mapping with three vectors on the CPU. Seperate output is used. The function is a wrapper for CPU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
input3 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CPU | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | input3, | ||
Matrix< T > & | output | ||
) |
Performs mapping with three matrices on the CPU. Seperate output is used. The function is a wrapper for CPU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
input3 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
void skepu::Map< MapFunc >::CPU | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
Input3Iterator | input3Begin, | ||
Input3Iterator | input3End, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map with three vector element ranges on the CPU. Seperate output range is used. The Map skeleton needs to be created with a trinary user function. The computation is done by iterating over all the elements in the ranges and applying the user function on each of them.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
input3Begin | An iterator to the first element in the third range. |
input3End | An iterator to the last element of the third range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::CPU | ( | SparseMatrix< T > & | input | ) |
Performs mapping on one sparse matrix on the CPU. Input is used as output.
input | A sparse matrix which the mapping will be performed on. It will be overwritten with the result. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHostAndInvalidateDevice().
void skepu::Map< MapFunc >::CPU | ( | SparseMatrix< T > & | input, |
SparseMatrix< T > & | output | ||
) |
Performs mapping with one sparse matrix on the CPU. Seperate output is used.
input | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHost().
void skepu::Map< MapFunc >::CPU | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | output | ||
) |
Performs mapping with two sparse matrices as input on the CPU. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHost().
void skepu::Map< MapFunc >::CPU | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | input3, | ||
SparseMatrix< T > & | output | ||
) |
Performs mapping with two sparse matrices as input on the CPU. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
input3 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHost().
void skepu::Map< MapFunc >::CU | ( | Vector< T > & | input, |
int | useNumGPU = 1 |
||
) |
Performs mapping on one vector with CUDA backend. Input is used as output. The function is a wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
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_map().
void skepu::Map< MapFunc >::CU | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping on one vector with CUDA backend. Seperate output vector. The function is a wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CU | ( | Matrix< T > & | input, |
int | useNumGPU = 1 |
||
) |
Performs mapping on one matrix with CUDA backend. Input is used as output. The function is a wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A matrix which the mapping will be performed on. It will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CU | ( | Matrix< T > & | input, |
Matrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping on one matrix with CUDA backend. Seperate output matrix. The function is a wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CU | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on one element range with CUDA as backend. Input is used as output. The Map skeleton needs to be created with a unary user function. The function is a wrapper for CU(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin, int useNumGPU).
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CU | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
OutputIterator | outputBegin, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on one element range with CUDA as backend. Seperate output range. The Map skeleton needs to be created with a unary user function. Decides whether to use one device and mapSingleThread_CU or multiple devices. In the case of several devices the input ranges is divided evenly among the devices.
inputBegin | An iterator to the first element in the first range. |
inputEnd | An iterator to the last element of the first range. |
outputBegin | An iterator to the first element of the output range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::MapKernelUnary_CU(), skepu::max(), MAX_GPU_DEVICES, and skepu::min().
void skepu::Map< MapFunc >::CU | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping on two vectors with CUDA as backend. Seperate output vector. The function is a wrapper for CU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int useNumGPU).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CU | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping on two matrices with CUDA as backend. Seperate output matrix. The function is a wrapper for CU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin, int useNumGPU).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CU | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
OutputIterator | outputBegin, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on two element ranges with CUDA as backend. Seperate output range. The Map skeleton needs to be created with a binary user function. Decides whether to use one device and mapSingleThread_CU or multiple devices. In the case of several devices the input ranges is divided evenly among the devices.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
outputBegin | An iterator to the first element of the output range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::MapKernelBinary_CU(), skepu::max(), MAX_GPU_DEVICES, and skepu::min().
void skepu::Map< MapFunc >::CU | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | input3, | ||
Vector< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping on three vectors with CUDA as backend. Seperate output vector. The function is a wrapper for CU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
input3 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::CU | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | input3, | ||
Matrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping on three matrices with CUDA as backend. Seperate output matrix. The function is a wrapper for CU(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin, int useNumGPU).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
input3 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
void skepu::Map< MapFunc >::CU | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
Input3Iterator | input3Begin, | ||
Input3Iterator | input3End, | ||
OutputIterator | outputBegin, | ||
int | useNumGPU = 1 |
||
) |
Performs the Map on three vector element ranges with CUDA as backend. Seperate output range. The Map skeleton needs to be created with a trinary user function. Decides whether to use one device and mapSingleThread_CU or multiple devices. In the case of several devices the input ranges is divided evenly among the devices.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
input3Begin | An iterator to the first element in the third range. |
input3End | An iterator to the last element of the third range. |
outputBegin | An iterator to the first element of the output range. |
useNumGPU | Integer specifying how many devices to use. 0 = Implementation decides. |
References skepu::MapKernelTrinary_CU(), skepu::max(), MAX_GPU_DEVICES, and skepu::min().
void skepu::Map< MapFunc >::CU | ( | SparseMatrix< T > & | input, |
int | useNumGPU = 1 |
||
) |
Performs mapping on one sparse matrix on the CUDA. Input is used as output.
input | A sparse matrix which the mapping will be performed on. It will be overwritten with the result. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
void skepu::Map< MapFunc >::CU | ( | SparseMatrix< T > & | input, |
SparseMatrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping with one sparse matrix on the CUDA. Seperate output is used.
input | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
References skepu::DeviceMemPointer_CU< T >::changeDeviceData(), skepu::SparseMatrix< T >::get_values(), skepu::DeviceMemPointer_CU< T >::getDeviceDataPointer(), skepu::MapKernelUnary_CU(), skepu::max(), MAX_GPU_DEVICES, skepu::min(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateDevice_CU().
void skepu::Map< MapFunc >::CU | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping with two sparse matrices as input on the CUDA. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
References skepu::DeviceMemPointer_CU< T >::changeDeviceData(), skepu::SparseMatrix< T >::get_values(), skepu::DeviceMemPointer_CU< T >::getDeviceDataPointer(), skepu::MapKernelBinary_CU(), skepu::max(), MAX_GPU_DEVICES, skepu::min(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateDevice_CU().
void skepu::Map< MapFunc >::CU | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | input3, | ||
SparseMatrix< T > & | output, | ||
int | useNumGPU = 1 |
||
) |
Performs mapping with two sparse matrices as input on the CUDA. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
input3 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
useNumGPU | Integer specifying how many devices to use. 0 = implementation decides. |
References skepu::DeviceMemPointer_CU< T >::changeDeviceData(), skepu::SparseMatrix< T >::get_values(), skepu::DeviceMemPointer_CU< T >::getDeviceDataPointer(), skepu::MapKernelTrinary_CU(), skepu::max(), MAX_GPU_DEVICES, skepu::min(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateDevice_CU().
|
inline |
Makes sure all operations on devices are finished.
References skepu::Environment< T >::finishAll().
void skepu::Map< MapFunc >::mapMultiStream_CU | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
OutputIterator | outputBegin, | ||
unsigned int | deviceID | ||
) |
Applies the Map skeleton to one range of elements specified by iterators. Result is saved to a seperate output range. The calculations are performed by one host thread using one
device with CUDA as backend. HtD transfers and Kernel execution are splitted across multiple CUDA Streams to achieve overlap.
The skeleton must have been created with a binary user function.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
outputBegin | An iterator to the first element of the output range. |
deviceID | Integer specifying the which device to use. |
References skepu::MapKernelUnary_CU(), skepu::max(), and skepu::min().
void skepu::Map< MapFunc >::OMP | ( | Vector< T > & | input | ) |
Performs mapping on one vector with OpenMP used as backend. Input is used as output. The function is a wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
Referenced by skepu::omp_tune_wrapper_map().
void skepu::Map< MapFunc >::OMP | ( | Vector< T > & | input, |
Vector< T > & | output | ||
) |
Performs mapping on one vector with OpenMP used as backend. Seperate output vector is used. The function is a wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
input | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::OMP | ( | Matrix< T > & | input | ) |
Performs mapping on one matrix with OpenMP used as backend. Input is used as output. The function is a wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
input | A vector which the mapping will be performed on. It will be overwritten with the result. |
void skepu::Map< MapFunc >::OMP | ( | Matrix< T > & | input, |
Matrix< T > & | output | ||
) |
Performs mapping on one matrix with OpenMP used as backend. Seperate output matrix is used. The function is a wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
input | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
void skepu::Map< MapFunc >::OMP | ( | InputIterator | inputBegin, |
InputIterator | inputEnd | ||
) |
Performs the Map with one element range using the OpenMP
backend. Input is used as output. The function is a wrapper for OMP(InputIterator inputBegin, InputIterator inputEnd, OutputIterator outputBegin).
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
void skepu::Map< MapFunc >::OMP | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map with one element range using the OpenMP
backend. Seperate output range is used. The Map skeleton needs to be created with a unary user function. The computation is done by iterating over all the elements in the range and applying the user function on each of them. The range is automatically divided amongst threads by OpenMP.
inputBegin | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::OMP | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | output | ||
) |
Performs mapping on two vectors with OpenMP used as backend. Seperate output vector is used. The function is a wrapper for OMP(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::OMP | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | output | ||
) |
Performs mapping on two matrices with OpenMP used as backend. Seperate output matrix is used. The function is a wrapper for OMP(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, OutputIterator outputBegin).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
void skepu::Map< MapFunc >::OMP | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map with two element ranges using the OpenMP
backend. Seperate output range is used. The Map skeleton needs to be created with a binary user function. The computation is done by iterating over all the elements in the ranges and applying the user function on each of them. The ranges is automatically divided amongst threads by OpenMP.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::OMP | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | input3, | ||
Vector< T > & | output | ||
) |
Performs mapping on three vectors with OpenMP used as backend. Seperate output vector is used. The function is a wrapper for OMP(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin).
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
input3 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result. |
References skepu::Vector< T >::begin(), and skepu::Vector< T >::end().
void skepu::Map< MapFunc >::OMP | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | input3, | ||
Matrix< T > & | output | ||
) |
Performs mapping on three matrices with OpenMP used as backend. Seperate output matrix is used. The function is a wrapper for OMP(Input1Iterator input1Begin, Input1Iterator input1End, Input2Iterator input2Begin, Input2Iterator input2End, Input3Iterator input3Begin, Input3Iterator input3End, OutputIterator outputBegin).
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
input3 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result. |
void skepu::Map< MapFunc >::OMP | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
Input3Iterator | input3Begin, | ||
Input3Iterator | input3End, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map with three element ranges using the OpenMP
backend. Seperate output range is used. The Map skeleton needs to be created with a trinary user function. The computation is done by iterating over all the elements in the ranges and applying the user function on each of them. The ranges is automatically divided amongst threads by OpenMP.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
input3Begin | An iterator to the first element in the third range. |
input3End | An iterator to the last element of the third range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::OMP | ( | SparseMatrix< T > & | input | ) |
Performs mapping on one sparse matrix on the OpenMP. Input is used as output.
input | A sparse matrix which the mapping will be performed on. It will be overwritten with the result. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHostAndInvalidateDevice().
void skepu::Map< MapFunc >::OMP | ( | SparseMatrix< T > & | input, |
SparseMatrix< T > & | output | ||
) |
Performs mapping with one sparse matrix on the OpenMP. Seperate output is used.
input | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHost().
void skepu::Map< MapFunc >::OMP | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | output | ||
) |
Performs mapping with two sparse matrices as input on the OpenMP. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHost().
void skepu::Map< MapFunc >::OMP | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | input3, | ||
SparseMatrix< T > & | output | ||
) |
Performs mapping with two sparse matrices as input on the OpenMP. Seperate output is used.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
input3 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::get_values(), skepu::SparseMatrix< T >::total_nnz(), and skepu::SparseMatrix< T >::updateHost().
void skepu::Map< MapFunc >::operator() | ( | Vector< T > & | input | ) |
Performs the Map on one vector. With itself as output. The Map skeleton needs to be created with a unary user function.
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. |
References skepu::Vector< T >::empty(), skepu::Vector< T >::isModified_CU(), skepu::Vector< T >::isVectorOnDevice_CU(), and skepu::Vector< T >::size().
void skepu::Map< MapFunc >::operator() | ( | Vector< T > & | input, |
Vector< T > & | output, | ||
int | groupId = -1 |
||
) |
Performs the Map on one vector. With a second vector as output. The Map skeleton needs to be created with a unary user function.
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. |
References skepu::Vector< T >::clear(), skepu::Vector< T >::empty(), skepu::Vector< T >::isModified_CU(), skepu::Vector< T >::isVectorOnDevice_CU(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().
void skepu::Map< MapFunc >::operator() | ( | Matrix< T > & | input | ) |
Performs the Map on one matrix. With itself as output. The Map skeleton needs to be created with a unary user function.
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. |
void skepu::Map< MapFunc >::operator() | ( | Matrix< T > & | input, |
Matrix< T > & | output | ||
) |
Performs the Map on one matrix. With a second matrix as output. The Map skeleton needs to be created with a unary user function.
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. |
void skepu::Map< MapFunc >::operator() | ( | InputIterator | inputBegin, |
InputIterator | inputEnd | ||
) |
Performs the Map on a range of elements. The same range is used as output. The Map skeleton needs to be created with a unary user function.
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 | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
void skepu::Map< MapFunc >::operator() | ( | InputIterator | inputBegin, |
InputIterator | inputEnd, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map on a range of elements. A seperate output range is used. The Map skeleton needs to be created with a unary user function.
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 | An iterator to the first element in the range. |
inputEnd | An iterator to the last element of the range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::operator() | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | output | ||
) |
Performs the Map on two vectors. With a seperate output. The Map skeleton needs to be created with a binary user function.
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.
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
both are on GPU...
one of them is on GPU...
nothing is on GPU...
References skepu::Vector< T >::clear(), skepu::Vector< T >::empty(), skepu::Vector< T >::isModified_CU(), skepu::Vector< T >::isVectorOnDevice_CU(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().
void skepu::Map< MapFunc >::operator() | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | output | ||
) |
Performs the Map on two matrices. With a seperate output. The Map skeleton needs to be created with a binary user function.
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.
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result and resized if needed. |
both are on GPU...
one of them is on GPU...
nothing is on GPU...
void skepu::Map< MapFunc >::operator() | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map on two ranges of elements. With a seperate output range. The Map skeleton needs to be created with a binary user function.
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.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::operator() | ( | Vector< T > & | input1, |
Vector< T > & | input2, | ||
Vector< T > & | input3, | ||
Vector< T > & | output | ||
) |
Performs the Map on three vectors. With a seperate output. The Map skeleton needs to be created with a trinary user function.
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.
input1 | A vector which the mapping will be performed on. |
input2 | A vector which the mapping will be performed on. |
input3 | A vector which the mapping will be performed on. |
output | The result vector, will be overwritten with the result and resized if needed. |
all three are on GPU...
two of them are present on GPU...
one of them is present on GPU...
nothing is present on GPU...
References skepu::Vector< T >::clear(), skepu::Vector< T >::empty(), skepu::Vector< T >::isModified_CU(), skepu::Vector< T >::isVectorOnDevice_CU(), skepu::Vector< T >::resize(), and skepu::Vector< T >::size().
void skepu::Map< MapFunc >::operator() | ( | Matrix< T > & | input1, |
Matrix< T > & | input2, | ||
Matrix< T > & | input3, | ||
Matrix< T > & | output | ||
) |
Performs the Map on three matrices. With a seperate output. The Map skeleton needs to be created with a trinary user function.
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.
input1 | A matrix which the mapping will be performed on. |
input2 | A matrix which the mapping will be performed on. |
input3 | A matrix which the mapping will be performed on. |
output | The result matrix, will be overwritten with the result and resized if needed. |
all three are on GPU...
two of them are present on GPU...
one of them is present on GPU...
nothing is present on GPU...
void skepu::Map< MapFunc >::operator() | ( | Input1Iterator | input1Begin, |
Input1Iterator | input1End, | ||
Input2Iterator | input2Begin, | ||
Input2Iterator | input2End, | ||
Input3Iterator | input3Begin, | ||
Input3Iterator | input3End, | ||
OutputIterator | outputBegin | ||
) |
Performs the Map on three ranges of elements. With a seperate output range. The Map skeleton needs to be created with a trinary user function.
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.
input1Begin | An iterator to the first element in the first range. |
input1End | An iterator to the last element of the first range. |
input2Begin | An iterator to the first element in the second range. |
input2End | An iterator to the last element of the second range. |
input3Begin | An iterator to the first element in the third range. |
input3End | An iterator to the last element of the third range. |
outputBegin | An iterator to the first element of the output range. |
void skepu::Map< MapFunc >::operator() | ( | SparseMatrix< T > & | input | ) |
Performs the Map on one sparse matrix. With itself as output. The Map skeleton needs to be created with a unary user function.
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 sparse matrix which the mapping will be performed on. It will be overwritten with the result. |
References skepu::SparseMatrix< T >::isModified_CU(), skepu::SparseMatrix< T >::isSparseMatrixOnDevice_CU(), and skepu::SparseMatrix< T >::total_nnz().
void skepu::Map< MapFunc >::operator() | ( | SparseMatrix< T > & | input, |
SparseMatrix< T > & | output | ||
) |
Performs the Map on one sparse matrix. With a second sparse matrix as output. The Map skeleton needs to be created with a unary user function.
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 sparse matrix which the mapping will be performed on. |
output | The result Sparse Matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::isModified_CU(), skepu::SparseMatrix< T >::isSparseMatrixOnDevice_CU(), skepu::SparseMatrix< T >::resize(), and skepu::SparseMatrix< T >::total_nnz().
void skepu::Map< MapFunc >::operator() | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | output | ||
) |
Performs the Map on two sparse matrices. With a seperate output. The Map skeleton needs to be created with a binary user function.
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.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::isModified_CU(), skepu::SparseMatrix< T >::isSparseMatrixOnDevice_CU(), skepu::SparseMatrix< T >::resize(), and skepu::SparseMatrix< T >::total_nnz().
void skepu::Map< MapFunc >::operator() | ( | SparseMatrix< T > & | input1, |
SparseMatrix< T > & | input2, | ||
SparseMatrix< T > & | input3, | ||
SparseMatrix< T > & | output | ||
) |
Performs the Map on three sparse matrices. With a seperate output. The Map skeleton needs to be created with a trinary user function.
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.
input1 | A sparse matrix which the mapping will be performed on. |
input2 | A sparse matrix which the mapping will be performed on. |
input3 | A sparse matrix which the mapping will be performed on. |
output | The result sparse matrix, will be overwritten with the result and resized if needed. |
References skepu::SparseMatrix< T >::isModified_CU(), skepu::SparseMatrix< T >::isSparseMatrixOnDevice_CU(), skepu::SparseMatrix< T >::resize(), and skepu::SparseMatrix< T >::total_nnz().
|
inline |
If the Mapping function supports a constant, set it with this function before a call.