12 #ifndef _CU_LINEAR_OPERATOR_CU_CSR_MATRIX_H_
13 #define _CU_LINEAR_OPERATOR_CU_CSR_MATRIX_H_
20 #include "../_definitions/types.h"
21 #include "../_c_linear_operator/c_csr_matrix.h"
29 template <
typename DataType>
40 const DataType* A_data_,
45 const int num_gpu_devices_);
50 const DataType* device_vector,
51 DataType* device_product);
54 const DataType* device_vector,
56 DataType* device_product);
59 const DataType* device_vector,
60 DataType* device_product);
63 const DataType* device_vector,
65 DataType* device_product);
74 cusparseOperation_t cusparse_operation,
77 cusparseDnVecDescr_t& cusparse_input_vector,
78 cusparseDnVecDescr_t& cusparse_output_vector,
79 cusparseSpMVAlg_t algorithm);
size_t * device_buffer_num_bytes
cuCSRMatrix()
Default constructor.
virtual ~cuCSRMatrix()
Virtual desructor.
virtual void transpose_dot(const DataType *device_vector, DataType *device_product)
cusparseSpMatDescr_t * cusparse_matrix_A
virtual void dot_plus(const DataType *device_vector, const DataType alpha, DataType *device_product)
LongIndexType ** device_A_index_pointer
DataType ** device_A_data
virtual void dot(const DataType *device_vector, DataType *device_product)
virtual void transpose_dot_plus(const DataType *device_vector, const DataType alpha, DataType *device_product)
void allocate_buffer(const int device_id, cusparseOperation_t cusparse_operation, const DataType alpha, const DataType beta, cusparseDnVecDescr_t &cusparse_input_vector, cusparseDnVecDescr_t &cusparse_output_vector, cusparseSpMVAlg_t algorithm)
Allocates an external buffer for matrix-vector multiplication using cusparseSpMV function.
virtual void copy_host_to_device()
Copies the member data from the host memory to the device memory.
LongIndexType ** device_A_indices
Base class for constant matrices.