SG++-Doxygen-Documentation
|
This class provides an operation for evaluating multiple grid points in the domain and doing least squares data mining. More...
#include <OperationMultiEvalStreamingOCLMultiPlatform.hpp>
Public Member Functions | |
double | getDuration () override |
void | mult (base::DataVector &alpha, base::DataVector &result) override |
Performs the MultiEval operation \(v:= B^T \alpha\). More... | |
void | mult (base::DataVector &alpha, base::DataVector &result, size_t startIndexData, size_t endIndexData) override |
Multiplication of \(B^T\) with vector \(\alpha\). More... | |
void | multTranspose (base::DataVector &source, base::DataVector &result) override |
Performs the transposed MultiEval operation \(v':= B v\). More... | |
void | multTranspose (base::DataVector &source, base::DataVector &result, size_t startIndexGrid, size_t endIndexGrid) override |
Multiplication of \(B\) with vector \(\alpha\). More... | |
OperationMultiEvalStreamingOCLMultiPlatform (base::Grid &grid, base::DataMatrix &dataset, std::shared_ptr< base::OCLManagerMultiPlatform > manager, std::shared_ptr< base::OCLOperationConfiguration > parameters) | |
Creates a new instance of the OperationMultiEvalStreamingOCLMultiPlatform class. More... | |
void | prepare () override |
Creates the internal data structures used by the algorithm. More... | |
~OperationMultiEvalStreamingOCLMultiPlatform () | |
Destructor. More... | |
Public Member Functions inherited from sgpp::base::OperationMultipleEval | |
void | eval (DataVector &alpha, DataVector &result) |
Evaluate multiple datapoints with the specified grid. More... | |
virtual std::string | getImplementationName () |
Name of this implementation of the operation. More... | |
OperationMultipleEval (sgpp::base::Grid &grid, DataMatrix &dataset) | |
Constructor. More... | |
virtual | ~OperationMultipleEval () |
Destructor. More... | |
Protected Attributes | |
size_t | commonDatasetPadding |
size_t | commonGridPadding |
size_t | datasetSizePadded |
size_t | datasetSizeUnpadded |
std::vector< std::shared_ptr< base::OCLDevice > > | devices |
size_t | dims |
double | duration |
size_t | gridSizePadded |
size_t | gridSizeUnpadded |
std::vector< T > | index |
std::vector< T > | kernelDataset |
std::vector< T > | level |
std::shared_ptr< base::OCLManagerMultiPlatform > | manager |
std::vector< StreamingOCLMultiPlatform::KernelMult< T > > | multKernels |
std::vector< StreamingOCLMultiPlatform::KernelMultTranspose< T > > | multTransposeKernels |
base::SGppStopwatch | myTimer |
std::shared_ptr< base::OCLOperationConfiguration > | parameters |
base::DataMatrix | preparedDataset |
std::shared_ptr< base::QueueLoadBalancerOpenMP > | queueLoadBalancerMult |
std::shared_ptr< base::QueueLoadBalancerOpenMP > | queueLoadBalancerMultTranspose |
bool | verbose |
Protected Attributes inherited from sgpp::base::OperationMultipleEval | |
DataMatrix & | dataset |
Grid & | grid |
bool | isPrepared |
This class provides an operation for evaluating multiple grid points in the domain and doing least squares data mining.
This algorithmic variant uses the streaming algorithm for evaluation. It uses high performance OpenCL kernels and is well-suited for large irregular datasets and grids. This class manages one OpenCL kernel for each devices configured using the OCLOperationConfiguration. When a operation is called it triggers the device work by using OpenMP and delegating the work to instances of the kernels. Furthermore, this class converts the received grid and dataset into a representation that is suited for the streaming algorithm.
|
inline |
Creates a new instance of the OperationMultiEvalStreamingOCLMultiPlatform class.
This class should not be created directly, instead the datadriven operator factory should be used or at least the factory method.
grid | The grid to evaluate |
dataset | The datapoints to evaluate |
manager | The OpenCL manager that manages OpenCL internels for this kernel |
parameters | The configuration of the kernel leading to different compute kernels |
References sgpp::datadriven::StreamingOCLMultiPlatform::Configuration::getKernelName(), sgpp::base::DataMatrix::getNcols(), sgpp::base::DataMatrix::getNrows(), sgpp::base::DataMatrix::getSize(), python.statsfileInfo::i, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::prepare(), and sgpp::base::DataMatrix::transpose().
|
inline |
Destructor.
|
inlineoverridevirtual |
Implements sgpp::base::OperationMultipleEval.
References sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::duration.
|
inlineoverridevirtual |
Performs the MultiEval operation \(v:= B^T \alpha\).
alpha | The surpluses of the grid |
result | A vector that contains the result in the order of the dataset |
Implements sgpp::base::OperationMultipleEval.
|
inlineoverridevirtual |
Multiplication of \(B^T\) with vector \(\alpha\).
This implementation variant produces a partial result passed on the start and end index provided. Not every MultiEval operation implements this method, as it only useful for distributed algorithms.
alpha | vector, to which \(B\) is applied. Typically the coefficient vector |
result | the result vector of the matrix vector multiplication |
startIndexData | begin of the fragment of the dataset to be evaluated |
endIndexData | end of the fragment of the dataset to be evaluated |
Reimplemented from sgpp::base::OperationMultipleEval.
References sgpp::base::DataVector::getSize(), sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::gridSizePadded, python.statsfileInfo::i, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::prepare(), sgpp::base::SGppStopwatch::start(), and sgpp::base::SGppStopwatch::stop().
|
inlineoverridevirtual |
Performs the transposed MultiEval operation \(v':= B v\).
source | The vector \(v\) |
result | The result of the matrix vector multiplication in the order of grid (of the alpha vector) |
Implements sgpp::base::OperationMultipleEval.
|
inlineoverridevirtual |
Multiplication of \(B\) with vector \(\alpha\).
This implementation variant produces a partial result passed on the start and end index provided. Not every MultiEval operation implements this method, as it only useful for distributed algorithms.
source | vector, to which \(B^T\) is applied. Typically the coefficient vector |
result | the result vector of the matrix vector multiplication |
startIndexGrid | begin of the fragment of the grid to apply the operator to |
endIndexGrid | end of the fragment of the grid to be apply the operator to |
Reimplemented from sgpp::base::OperationMultipleEval.
References sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::datasetSizePadded, sgpp::base::DataVector::getSize(), python.statsfileInfo::i, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::prepare(), sgpp::base::SGppStopwatch::start(), and sgpp::base::SGppStopwatch::stop().
|
inlineoverridevirtual |
Creates the internal data structures used by the algorithm.
Needs to be called every time the grid changes e.g., due to refinement.
Reimplemented from sgpp::base::OperationMultipleEval.
References sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::commonDatasetPadding, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::commonGridPadding, sgpp::base::OperationMultipleEval::dataset, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::datasetSizePadded, chess::dim, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::dims, sgpp::base::HashGridPoint::get(), sgpp::base::HashGridStorage::getDimension(), sgpp::datadriven::StreamingOCLMultiPlatform::Configuration::getKernelName(), sgpp::base::DataMatrix::getNrows(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::DataMatrix::getRow(), sgpp::base::HashGridStorage::getSize(), sgpp::base::Grid::getStorage(), sgpp::base::OperationMultipleEval::grid, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::gridSizePadded, python.statsfileInfo::i, sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::index, sgpp::base::DataMatrix::resize(), and sgpp::base::DataMatrix::setRow().
Referenced by sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::mult(), sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::multTranspose(), and sgpp::datadriven::StreamingOCLMultiPlatform::OperationMultiEvalStreamingOCLMultiPlatform< T >::OperationMultiEvalStreamingOCLMultiPlatform().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |