SG++-Doxygen-Documentation
sgpp::datadriven::OperationMultiEvalCuda Class Reference

OperationMultipleEval for polynomial basis functions (grad >= 2) using CUDA on grids without boundary nodes. More...

#include <OperationMultiEvalCuda.hpp>

Inheritance diagram for sgpp::datadriven::OperationMultiEvalCuda:
sgpp::base::OperationMultipleEval

Public Member Functions

double getDuration () override
 Returns time in s of last mult, multTransposed, multTransposedFMA. More...
 
void mult (base::DataVector &source, base::DataVector &result) override
 Standard evaluation. More...
 
void multTranspose (base::DataVector &source, base::DataVector &result) override
 Transposed evaluation. More...
 
void multTransposeFMA (base::DataVector &source, base::DataVector &prev, double lambda, base::DataVector &result)
 Transposed evaluation with additional FMA. result = 1/M * B*source + lambda * prev. More...
 
 OperationMultiEvalCuda (base::Grid &grid, base::DataMatrix &dataset, const uint32_t &grad)
 Constructor. Autocheck dataset for Morton order and turn on permutation if not. More...
 
 OperationMultiEvalCuda (base::Grid &grid, base::DataMatrix &dataset, const uint32_t &grad, bool autocheck)
 Constructor. Autocheck for Morton order can be disabled. More...
 
void prepare () override
 Does all preprocessing for given grid and dataset and copies data to the GPU. More...
 
 ~OperationMultiEvalCuda ()
 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...
 
virtual void mult (DataVector &alpha, DataVector &result, size_t startIndexData, size_t endIndexData)
 Multiplication of \(B^T\) with vector \(\alpha\). More...
 
virtual void multTranspose (DataVector &source, DataVector &result, size_t startIndexGrid, size_t endIndexGrid)
 Multiplication of \(B\) with vector \(\alpha\). More...
 
 OperationMultipleEval (sgpp::base::Grid &grid, DataMatrix &dataset)
 Constructor. More...
 
virtual ~OperationMultipleEval ()
 Destructor. More...
 

Protected Attributes

uint32_t _M
 
uint32_t _N
 
OpMultiEvalCudaDetail::HostDevPtr< double > alpha
 
OpMultiEvalCudaDetail::HostDevPtr< double > data
 
uint32_t DIM
 
double duration
 
OpMultiEvalCudaDetail::HostDevPtr< uint32_t > levellimit
 
uint32_t M
 
uint32_t maxlevel
 
base::SGppStopwatch myTimer
 
uint32_t N
 
OpMultiEvalCudaDetail::HostDevPtr< OpMultiEvalCudaDetail::gridnode_t > node
 
uint32_t polygrad
 
OpMultiEvalCudaDetail::HostDevPtr< double > pos
 
OpMultiEvalCudaDetail::HostDevPtr< OpMultiEvalCudaDetail::limit_t > streamlimit
 
OpMultiEvalCudaDetail::HostDevPtr< uint32_t > subs
 
OpMultiEvalCudaDetail::MortonOrder * zorder
 
- Protected Attributes inherited from sgpp::base::OperationMultipleEval
DataMatrixdataset
 
Gridgrid
 
bool isPrepared
 

Detailed Description

OperationMultipleEval for polynomial basis functions (grad >= 2) using CUDA on grids without boundary nodes.

Constructor & Destructor Documentation

sgpp::datadriven::OperationMultiEvalCuda::OperationMultiEvalCuda ( base::Grid grid,
base::DataMatrix dataset,
const uint32_t &  grad 
)

Constructor. Autocheck dataset for Morton order and turn on permutation if not.

Construct the class.

References polygrad, prepare(), and zorder.

sgpp::datadriven::OperationMultiEvalCuda::OperationMultiEvalCuda ( base::Grid grid,
base::DataMatrix dataset,
const uint32_t &  grad,
bool  autocheck 
)

Constructor. Autocheck for Morton order can be disabled.

Construct the class.

References polygrad, prepare(), and zorder.

sgpp::datadriven::OperationMultiEvalCuda::~OperationMultiEvalCuda ( )

Destructor.

Destroy everything ;)

References zorder.

Member Function Documentation

double sgpp::datadriven::OperationMultiEvalCuda::getDuration ( )
overridevirtual

Returns time in s of last mult, multTransposed, multTransposedFMA.

Returns last measured time.

Implements sgpp::base::OperationMultipleEval.

References duration.

void sgpp::datadriven::OperationMultiEvalCuda::mult ( base::DataVector source,
base::DataVector result 
)
overridevirtual
void sgpp::datadriven::OperationMultiEvalCuda::multTranspose ( base::DataVector source,
base::DataVector result 
)
overridevirtual
void sgpp::datadriven::OperationMultiEvalCuda::multTransposeFMA ( base::DataVector source,
base::DataVector prev,
double  lambda,
base::DataVector result 
)

Transposed evaluation with additional FMA. result = 1/M * B*source + lambda * prev.

Transposed evaluation with additional FMA.

References _M, _N, alpha, chess::b, data, duration, python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, lambda, M, myTimer, N, node, pos, sgpp::base::SGppStopwatch::start(), sgpp::base::SGppStopwatch::stop(), streamlimit, and zorder.

Member Data Documentation

uint32_t sgpp::datadriven::OperationMultiEvalCuda::_M
protected
uint32_t sgpp::datadriven::OperationMultiEvalCuda::_N
protected
OpMultiEvalCudaDetail::HostDevPtr<double> sgpp::datadriven::OperationMultiEvalCuda::alpha
protected
OpMultiEvalCudaDetail::HostDevPtr<double> sgpp::datadriven::OperationMultiEvalCuda::data
protected
uint32_t sgpp::datadriven::OperationMultiEvalCuda::DIM
protected

Referenced by mult(), and prepare().

double sgpp::datadriven::OperationMultiEvalCuda::duration
protected
OpMultiEvalCudaDetail::HostDevPtr<uint32_t> sgpp::datadriven::OperationMultiEvalCuda::levellimit
protected

Referenced by mult(), and prepare().

uint32_t sgpp::datadriven::OperationMultiEvalCuda::M
protected
uint32_t sgpp::datadriven::OperationMultiEvalCuda::maxlevel
protected

Referenced by mult(), and prepare().

base::SGppStopwatch sgpp::datadriven::OperationMultiEvalCuda::myTimer
protected
uint32_t sgpp::datadriven::OperationMultiEvalCuda::N
protected

Referenced by mult(), multTransposeFMA(), and prepare().

OpMultiEvalCudaDetail::HostDevPtr<OpMultiEvalCudaDetail::gridnode_t> sgpp::datadriven::OperationMultiEvalCuda::node
protected
uint32_t sgpp::datadriven::OperationMultiEvalCuda::polygrad
protected

Referenced by OperationMultiEvalCuda(), and prepare().

OpMultiEvalCudaDetail::HostDevPtr<double> sgpp::datadriven::OperationMultiEvalCuda::pos
protected
OpMultiEvalCudaDetail::HostDevPtr<OpMultiEvalCudaDetail::limit_t> sgpp::datadriven::OperationMultiEvalCuda::streamlimit
protected
OpMultiEvalCudaDetail::HostDevPtr<uint32_t> sgpp::datadriven::OperationMultiEvalCuda::subs
protected

Referenced by mult(), and prepare().

OpMultiEvalCudaDetail::MortonOrder* sgpp::datadriven::OperationMultiEvalCuda::zorder
protected

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