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

◆ OperationMultiEvalCuda() [1/2]

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.

◆ OperationMultiEvalCuda() [2/2]

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.

◆ ~OperationMultiEvalCuda()

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

Destructor.

Destroy everything ;)

References zorder.

Member Function Documentation

◆ getDuration()

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.

◆ mult()

void sgpp::datadriven::OperationMultiEvalCuda::mult ( base::DataVector source,
base::DataVector result 
)
overridevirtual

◆ multTranspose()

void sgpp::datadriven::OperationMultiEvalCuda::multTranspose ( base::DataVector source,
base::DataVector result 
)
overridevirtual

◆ multTransposeFMA()

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.

◆ prepare()

Member Data Documentation

◆ _M

uint32_t sgpp::datadriven::OperationMultiEvalCuda::_M
protected

◆ _N

uint32_t sgpp::datadriven::OperationMultiEvalCuda::_N
protected

◆ alpha

OpMultiEvalCudaDetail::HostDevPtr<double> sgpp::datadriven::OperationMultiEvalCuda::alpha
protected

◆ data

OpMultiEvalCudaDetail::HostDevPtr<double> sgpp::datadriven::OperationMultiEvalCuda::data
protected

◆ DIM

uint32_t sgpp::datadriven::OperationMultiEvalCuda::DIM
protected

Referenced by mult(), and prepare().

◆ duration

double sgpp::datadriven::OperationMultiEvalCuda::duration
protected

◆ levellimit

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

Referenced by mult(), and prepare().

◆ M

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

◆ maxlevel

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

Referenced by mult(), and prepare().

◆ myTimer

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

◆ N

uint32_t sgpp::datadriven::OperationMultiEvalCuda::N
protected

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

◆ node

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

◆ polygrad

uint32_t sgpp::datadriven::OperationMultiEvalCuda::polygrad
protected

Referenced by OperationMultiEvalCuda(), and prepare().

◆ pos

OpMultiEvalCudaDetail::HostDevPtr<double> sgpp::datadriven::OperationMultiEvalCuda::pos
protected

◆ streamlimit

OpMultiEvalCudaDetail::HostDevPtr<OpMultiEvalCudaDetail::limit_t> sgpp::datadriven::OperationMultiEvalCuda::streamlimit
protected

◆ subs

OpMultiEvalCudaDetail::HostDevPtr<uint32_t> sgpp::datadriven::OperationMultiEvalCuda::subs
protected

Referenced by mult(), and prepare().

◆ zorder

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

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