SG++-Doxygen-Documentation
sgpp::datadriven::StreamingOCLMultiPlatform::KernelMultTranspose< T > Class Template Reference

Kernel that provide the transposed MultiEval operation \(v':= B v\) for a single OpenCL device. More...

#include <KernelMultTranspose.hpp>

Public Member Functions

double getBuildDuration ()
 
 KernelMultTranspose (std::shared_ptr< base::OCLDevice > device, size_t dims, std::shared_ptr< base::OCLManagerMultiPlatform > manager, json::Node &kernelConfiguration, std::shared_ptr< base::QueueLoadBalancerOpenMP > queueBalancerMultTranspose)
 Constructs a new KernelMultTranspose object. More...
 
double multTranspose (std::vector< T > &level, std::vector< T > &index, std::vector< T > &dataset, std::vector< T > &source, std::vector< T > &result, const size_t start_index_data, const size_t end_index_data)
 Perform the transposed MultiEval operator \(v':= B v\) with the device this kernel manages. More...
 
 ~KernelMultTranspose ()
 Destructor. More...
 

Detailed Description

template<typename T>
class sgpp::datadriven::StreamingOCLMultiPlatform::KernelMultTranspose< T >

Kernel that provide the transposed MultiEval operation \(v':= B v\) 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

Constructor & Destructor Documentation

◆ KernelMultTranspose()

template<typename T>
sgpp::datadriven::StreamingOCLMultiPlatform::KernelMultTranspose< T >::KernelMultTranspose ( std::shared_ptr< base::OCLDevice device,
size_t  dims,
std::shared_ptr< base::OCLManagerMultiPlatform manager,
json::Node kernelConfiguration,
std::shared_ptr< base::QueueLoadBalancerOpenMP queueBalancerMultTranspose 
)
inline

Constructs a new KernelMultTranspose object.

Parameters
deviceThe OpenCL device this kernel instance manages
dimsDimensionality of the problem
managerThe OpenCL manager to reduce OpenCL boilerplate
kernelConfigurationThe configuration of this specific device
queueBalancerMultTransposeLoad balance for query work from for the device

References json::Node::getBool(), and json::Node::getUInt().

◆ ~KernelMultTranspose()

Member Function Documentation

◆ getBuildDuration()

template<typename T>
double sgpp::datadriven::StreamingOCLMultiPlatform::KernelMultTranspose< T >::getBuildDuration ( )
inline
Returns
The time it took to compile the OpenCL kernel code

References dataset, python.statsfileInfo::i, sgpp::base::OCLBufferWrapperSD< T >::intializeTo(), and level.

◆ multTranspose()

template<typename T>
double sgpp::datadriven::StreamingOCLMultiPlatform::KernelMultTranspose< T >::multTranspose ( std::vector< T > &  level,
std::vector< T > &  index,
std::vector< T > &  dataset,
std::vector< T > &  source,
std::vector< T > &  result,
const size_t  start_index_data,
const size_t  end_index_data 
)
inline

Perform the transposed MultiEval operator \(v':= B v\) with the device this kernel manages.

Has additional, currently unused parameters to enable further MPI parallelization in the future.

Parameters
levelVector containing the d-dimensional levels of the grid, the order matches the index vector
indexVector containing the d-dimensional indices of the grid, the order matches the level vector
datasetVector containing the d-dimensional data points
sourceVector \(v\)
resultThe results vector \(v'\) of the operation
start_index_datastart of range of data points to work on, currently not used
end_index_dataend of range of data points to work on, currently not used

References sgpp::datadriven::StreamingOCLMultiPlatform::SourceBuilderMultTranspose< 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.


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