1 #ifndef PARALUTION_MIC_MATRIX_HYB_HPP_
2 #define PARALUTION_MIC_MATRIX_HYB_HPP_
4 #include "../base_matrix.hpp"
5 #include "../base_vector.hpp"
6 #include "../matrix_formats.hpp"
10 template <
typename ValueType>
11 class MICAcceleratorMatrixHYB :
public MICAcceleratorMatrix<ValueType> {
23 virtual void info(
void)
const;
26 virtual void Clear(
void);
27 virtual void AllocateHYB(
const int ell_nnz,
const int coo_nnz,
const int ell_max_row,
28 const int nrow,
const int ncol);
58 #endif // PARALUTION_MIC_MATRIX_HYB_HPP_
virtual ~MICAcceleratorMatrixHYB()
Definition: mic_matrix_hyb.cpp:59
int ell_nnz_
Definition: mic_matrix_hyb.hpp:47
virtual void Apply(const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
Apply the matrix to vector, out = this*in;.
Definition: mic_matrix_hyb.cpp:411
Definition: matrix_formats.hpp:27
int get_coo_nnz(void) const
Definition: mic_matrix_hyb.hpp:21
MICAcceleratorMatrixHYB()
Definition: mic_matrix_hyb.cpp:28
Index max_row
Maximal elements per row.
Definition: matrix_formats.hpp:98
virtual void CopyToHost(HostMatrix< ValueType > *dst) const
Copy (accelerator matrix) to host matrix.
Definition: mic_matrix_hyb.cpp:212
virtual void CopyFrom(const BaseMatrix< ValueType > &mat)
Copy from another matrix.
Definition: mic_matrix_hyb.cpp:264
Definition: backend_manager.hpp:10
virtual void CopyTo(BaseMatrix< ValueType > *mat) const
Copy to another matrix.
Definition: mic_matrix_hyb.cpp:324
virtual unsigned int get_mat_format(void) const
Return the matrix format id (see matrix_formats.hpp)
Definition: mic_matrix_hyb.hpp:24
virtual void AllocateHYB(const int ell_nnz, const int coo_nnz, const int ell_max_row, const int nrow, const int ncol)
Allocate HYB Matrix.
Definition: mic_matrix_hyb.cpp:76
virtual void Clear(void)
Clear (free) the matrix.
Definition: mic_matrix_hyb.cpp:133
const IndexType const IndexType const IndexType const ValueType const ValueType scalar
Definition: cuda_kernels_coo.hpp:91
virtual void info(void) const
Shows simple info about the object.
Definition: mic_matrix_hyb.cpp:69
virtual void CopyFromHost(const HostMatrix< ValueType > &src)
Copy (accelerator matrix) from host matrix.
Definition: mic_matrix_hyb.cpp:163
virtual bool ConvertFrom(const BaseMatrix< ValueType > &mat)
Convert the matrix from another matrix (with different structure)
Definition: mic_matrix_hyb.cpp:389
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;.
Definition: mic_matrix_hyb.cpp:452
Base class for all host/accelerator matrices.
Definition: base_matrix.hpp:92
Definition: base_vector.hpp:22
Definition: backend_manager.cpp:43
Definition: backend_manager.hpp:14
Base class for all host/accelerator vectors.
Definition: base_vector.hpp:26
MatrixELL< ValueType, IndexType, Index > ELL
Definition: matrix_formats.hpp:111
int get_ell_max_row(void) const
Definition: mic_matrix_hyb.hpp:19
int get_ell_nnz(void) const
Definition: mic_matrix_hyb.hpp:20
int coo_nnz_
Definition: mic_matrix_hyb.hpp:48
MatrixHYB< ValueType, int > mat_
Definition: mic_matrix_hyb.hpp:45