1 #ifndef PARALUTION_GPU_MATRIX_ELL_HPP_
2 #define PARALUTION_GPU_MATRIX_ELL_HPP_
4 #include "../base_matrix.hpp"
5 #include "../base_vector.hpp"
6 #include "../matrix_formats.hpp"
10 template <
typename ValueType>
11 class GPUAcceleratorMatrixELL :
public GPUAcceleratorMatrix<ValueType> {
21 virtual void info(
void)
const;
24 virtual void Clear(
void);
25 virtual void AllocateELL(
const int nnz,
const int nrow,
const int ncol,
const int max_row);
27 const int nnz,
const int nrow,
const int ncol,
const int max_row);
60 #endif // PARALUTION_GPU_MATRIX_ELL_HPP_
virtual void AllocateELL(const int nnz, const int nrow, const int ncol, const int max_row)
Allocate ELL Matrix.
virtual void ApplyAdd(const BaseVector< ValueType > &in, const ValueType scalar, BaseVector< ValueType > *out) const
Apply and add the matrix to vector, out = out + scalar*this*in;.
GPUAcceleratorMatrixELL()
virtual ~GPUAcceleratorMatrixELL()
virtual void CopyFrom(const BaseMatrix< ValueType > &mat)
Copy from another matrix.
int get_max_row(void) const
Definition: gpu_matrix_ell.hpp:19
virtual void CopyTo(BaseMatrix< ValueType > *mat) const
Copy to another matrix.
virtual void CopyToHost(HostMatrix< ValueType > *dst) const
Copy (accelerator matrix) to host matrix.
virtual void Clear(void)
Clear (free) the matrix.
Index max_row
Maximal elements per row.
Definition: matrix_formats.hpp:98
Definition: backend_manager.hpp:10
virtual void CopyFromHost(const HostMatrix< ValueType > &src)
Copy (accelerator matrix) from host matrix.
Definition: base_vector.hpp:16
nnz
Definition: pcg_example.m:8
virtual void info(void) const
Shows simple info about the object.
const IndexType const IndexType const IndexType const ValueType const ValueType scalar
Definition: cuda_kernels_coo.hpp:91
virtual void CopyToHostAsync(HostMatrix< ValueType > *dst) const
Async opy (accelerator matrix) to host matrix.
virtual void SetDataPtrELL(int **col, ValueType **val, const int nnz, const int nrow, const int ncol, const int max_row)
Initialize an ELL matrix on the Host with externally allocated data.
virtual unsigned int get_mat_format(void) const
Return the matrix format id (see matrix_formats.hpp)
Definition: gpu_matrix_ell.hpp:22
Base class for all host/accelerator matrices.
Definition: base_matrix.hpp:92
virtual void CopyFromHostAsync(const HostMatrix< ValueType > &src)
Async copy (accelerator matrix) from host matrix.
MatrixELL< ValueType, int > mat_
Definition: gpu_matrix_ell.hpp:49
virtual void CopyToAsync(BaseMatrix< ValueType > *mat) const
Copy to another matrix.
Definition: backend_manager.cpp:43
Definition: backend_manager.hpp:14
virtual void CopyFromAsync(const BaseMatrix< ValueType > &mat)
Async copy from another matrix.
virtual void LeaveDataPtrELL(int **col, ValueType **val, int &max_row)
Leave an ELL matrix to Host pointers.
Definition: matrix_formats.hpp:26
virtual void Apply(const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
Apply the matrix to vector, out = this*in;.
Base class for all host/accelerator vectors.
Definition: base_vector.hpp:26
virtual bool ConvertFrom(const BaseMatrix< ValueType > &mat)
Convert the matrix from another matrix (with different structure)