SG++-Doxygen-Documentation
|
Kernel that provide the MultiEval \(v:= B^T \alpha\) operation for a single OpenCL device. More...
#include <KernelMult.hpp>
Public Member Functions | |
double | getBuildDuration () |
KernelMult (std::shared_ptr< base::OCLDevice > device, size_t dims, std::shared_ptr< base::OCLManagerMultiPlatform > manager, json::Node &kernelConfiguration, std::shared_ptr< base::QueueLoadBalancerOpenMP > queueBalancerMult) | |
Constructs a new KernelMult object. More... | |
double | 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) |
Perform the MultiEval operator with the device this kernel manages. More... | |
~KernelMult () | |
Destructor. More... | |
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.
|
inline |
Constructs a new KernelMult object.
device | The OpenCL device this kernel instance manages |
dims | Dimensionality of the problem |
manager | The OpenCL manager to reduce OpenCL boilerplate |
kernelConfiguration | The configuration of this specific device |
queueBalancerMult | Load balance for query work from for the device |
References json::Node::getBool(), and json::Node::getUInt().
|
inline |
Destructor.
|
inline |
References alpha, dataset, python.statsfileInfo::i, sgpp::base::OCLBufferWrapperSD< T >::intializeTo(), and level.
|
inline |
Perform the MultiEval operator with the device this kernel manages.
Has additional, currently unused parameters to enable further MPI parallelization in the future.
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 sgpp::datadriven::StreamingOCLMultiPlatform::SourceBuilderMult< real_type >::generateSource(), sgpp::base::OCLBufferWrapperSD< T >::getBuffer(), sgpp::base::OCLBufferWrapperSD< T >::getHostPointer(), python.statsfileInfo::i, sgpp::base::OCLBufferWrapperSD< T >::readFromBuffer(), and python.leja::start.