template<typename T>
class sgpp::datadriven::StreamingOCLMultiPlatform::KernelMult< T >
Kernel that provide the MultiEval \(v:= B^T \alpha\) operation for a single OpenCL device.
This class manages the OpenCL data structures required for a OpenCL kernel invocation. To that end, it makes heavy use of OpenCL buffer abstraction. It makes use of a queue of work packages to find out whether still device has any remaining work available. For the creation of the device-side compute kernel code, a code generator is used.
- See also
- base::OCLBufferWrapperSD
-
base::QueueLoadBalancer
-
SourceBuilderMultTranspose
template<typename T >
double sgpp::datadriven::StreamingOCLMultiPlatform::KernelMult< T >::mult |
( |
std::vector< T > & |
level, |
|
|
std::vector< T > & |
index, |
|
|
std::vector< T > & |
dataset, |
|
|
std::vector< T > & |
alpha, |
|
|
std::vector< T > & |
result, |
|
|
const size_t |
start_index_grid, |
|
|
const size_t |
end_index_grid, |
|
|
const size_t |
start_index_data, |
|
|
const size_t |
end_index_data |
|
) |
| |
|
inline |
Perform the MultiEval operator with the device this kernel manages.
Has additional, currently unused parameters to enable further MPI parallelization in the future.
- Parameters
-
level | Vector containing the d-dimensional levels of the grid, the order matches the index vector |
index | Vector containing the d-dimensional indices of the grid, the order matches the level vector |
dataset | Vector containing the d-dimensional data points |
alpha | Vector containing the surpluses, the order matches level and index |
result | The MultiEval results in the order of the data points of the dataset |
start_index_grid | start of range of grid points to work on, currently not used |
end_index_grid | end of range of grid points to work on, currently not used |
start_index_data | start of range of data points to work on, currently not used |
end_index_data | end of range of data points to work on, currently not used |
References alpha, dataset, sgpp::datadriven::StreamingOCLMultiPlatform::SourceBuilderMult< real_type >::generateSource(), sgpp::base::OCLBufferWrapperSD< T >::getBuffer(), sgpp::base::OCLBufferWrapperSD< T >::getHostPointer(), level, and sgpp::base::OCLBufferWrapperSD< T >::readFromBuffer().