1 #ifndef PARALUTION_HOST_MATRIX_MCSR_HPP_
2 #define PARALUTION_HOST_MATRIX_MCSR_HPP_
4 #include "../base_vector.hpp"
5 #include "../base_matrix.hpp"
6 #include "../matrix_formats.hpp"
10 template <
typename ValueType>
11 class HostMatrixMCSR :
public HostMatrix<ValueType> {
19 virtual void info(
void)
const;
22 virtual void Clear(
void);
23 virtual void AllocateMCSR(
const int nnz,
const int nrow,
const int ncol);
60 #endif // PARALUTION_HOST_MATRIX_MCSR_HPP_
Definition: matrix_formats.hpp:22
MatrixMCSR< ValueType, int > mat_
Definition: host_matrix_mcsr.hpp:42
Definition: base_matrix.hpp:24
Definition: base_matrix.hpp:14
virtual void info(void) const
Shows simple info about the object.
Definition: host_matrix_mcsr.cpp:54
virtual unsigned int get_mat_format(void) const
Return the matrix format id (see matrix_formats.hpp)
Definition: host_matrix_mcsr.hpp:20
virtual void CopyTo(BaseMatrix< ValueType > *mat) const
Copy to another matrix.
Definition: host_matrix_mcsr.cpp:148
nnz
Definition: pcg_example.m:8
virtual bool ILU0Factorize(void)
Perform ILU(0) factorization.
Definition: host_matrix_mcsr.cpp:191
virtual void Clear(void)
Clear (free) the matrix.
Definition: host_matrix_mcsr.cpp:61
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: host_matrix_mcsr.cpp:345
HostMatrixMCSR()
Definition: host_matrix_mcsr.cpp:21
const IndexType const IndexType const IndexType const ValueType const ValueType scalar
Definition: cuda_kernels_coo.hpp:91
virtual bool ConvertFrom(const BaseMatrix< ValueType > &mat)
Convert the matrix from another matrix (with different structure)
Definition: host_matrix_mcsr.cpp:155
virtual void CopyFrom(const BaseMatrix< ValueType > &mat)
Copy from another matrix.
Definition: host_matrix_mcsr.cpp:106
Definition: base_vector.hpp:10
virtual void Apply(const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
Apply the matrix to vector, out = this*in;.
Definition: host_matrix_mcsr.cpp:309
Definition: base_matrix.hpp:22
Definition: base_matrix.hpp:76
Base class for all host/accelerator matrices.
Definition: base_matrix.hpp:92
virtual bool LUSolve(const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
Solve LU out = in; if level-scheduling algorithm is provided then the graph traversing is performed i...
Definition: host_matrix_mcsr.cpp:261
Definition: base_matrix.hpp:16
Definition: backend_manager.cpp:43
virtual void AllocateMCSR(const int nnz, const int nrow, const int ncol)
Allocate MCSR Matrix.
Definition: host_matrix_mcsr.cpp:78
Definition: base_matrix.hpp:57
virtual ~HostMatrixMCSR()
Definition: host_matrix_mcsr.cpp:44
Base class for all host/accelerator vectors.
Definition: base_vector.hpp:26
Definition: base_matrix.hpp:38
virtual void LUAnalyseClear(void)
Delete the analysed data (see LUAnalyse)
Definition: host_matrix_mcsr.cpp:304
virtual void LUAnalyse(void)
Analyse the structure (level-scheduling)
Definition: host_matrix_mcsr.cpp:299