imate
C++/CUDA Reference
cuMatrix< DataType > Class Template Referenceabstract

Base class for constant matrices. More...

#include <cu_matrix.h>

Inheritance diagram for cuMatrix< DataType >:
Collaboration diagram for cuMatrix< DataType >:

Public Member Functions

 cuMatrix ()
 
 cuMatrix (int num_gpu_devices_)
 
virtual ~cuMatrix ()
 
virtual void copy_host_to_device ()=0
 
- Public Member Functions inherited from cuLinearOperator< DataType >
 cuLinearOperator ()
 
 cuLinearOperator (int num_gpu_devices_)
 Constructor with setting num_rows and num_columns. More...
 
virtual ~cuLinearOperator ()
 
cublasHandle_t get_cublas_handle () const
 This function returns a reference to the cublasHandle_t object. The object will be created, if it is not created already. More...
 
- Public Member Functions inherited from cLinearOperator< DataType >
 cLinearOperator ()
 Default constructor. More...
 
 cLinearOperator (const LongIndexType num_rows_, const LongIndexType num_columns_)
 Constructor with setting num_rows and num_columns. More...
 
virtual ~cLinearOperator ()
 
LongIndexType get_num_rows () const
 
LongIndexType get_num_columns () const
 
void set_parameters (DataType *parameters_)
 Sets the scalar parameter this->parameters. Parameter is initialized to NULL. However, before calling dot or transpose_dot functions, the parameters must be set. More...
 
IndexType get_num_parameters () const
 
FlagType is_eigenvalue_relation_known () const
 Returns a flag that determines whether a relation between the parameters of the operator and its eigenvalue(s) is known. More...
 
virtual DataType get_eigenvalue (const DataType *known_parameters, const DataType known_eigenvalue, const DataType *inquiry_parameters) const =0
 
virtual void dot (const DataType *vector, DataType *product)=0
 
virtual void transpose_dot (const DataType *vector, DataType *product)=0
 

Additional Inherited Members

- Protected Member Functions inherited from cuLinearOperator< DataType >
int query_gpu_devices () const
 Before any numerical computation, this method chechs if any gpu device is available on the machine, or notifies the user if nothing was found. More...
 
void initialize_cublas_handle ()
 Creates a cublasHandle_t object, if not created already. More...
 
void initialize_cusparse_handle ()
 Creates a cusparseHandle_t object, if not created already. More...
 
- Protected Attributes inherited from cuLinearOperator< DataType >
int num_gpu_devices
 
bool copied_host_to_device
 
cublasHandle_t * cublas_handle
 
cusparseHandle_t * cusparse_handle
 
- Protected Attributes inherited from cLinearOperator< DataType >
const LongIndexType num_rows
 
const LongIndexType num_columns
 
FlagType eigenvalue_relation_known
 
DataType * parameters
 
IndexType num_parameters
 

Detailed Description

template<typename DataType>
class cuMatrix< DataType >

Base class for constant matrices.

The prefix c in this class's name (and its derivatves), stands for the cpp code, intrast to the cu prefix, which stands for the cuda code. Most derived classes have a cuda counterpart.

See also
cuAffineMatrixFunction

Definition at line 40 of file cu_matrix.h.

Constructor & Destructor Documentation

◆ cuMatrix() [1/2]

template<typename DataType >
cuMatrix< DataType >::cuMatrix

Definition at line 24 of file cu_matrix.cu.

25 {
26 }

◆ cuMatrix() [2/2]

template<typename DataType >
cuMatrix< DataType >::cuMatrix ( int  num_gpu_devices_)
explicit

Definition at line 34 of file cu_matrix.cu.

34  :
35  cuLinearOperator<DataType>(num_gpu_devices_)
36 {
37 }
Base class for linear operators. This class serves as interface for all derived classes.

◆ ~cuMatrix()

template<typename DataType >
cuMatrix< DataType >::~cuMatrix
virtual

Definition at line 45 of file cu_matrix.cu.

46 {
47 }

Member Function Documentation

◆ copy_host_to_device()

template<typename DataType >
virtual void cuMatrix< DataType >::copy_host_to_device ( )
pure virtual

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