NeoN
A framework for CFD software
|
Sparse matrix class with compact storage by row (CSR) format. More...
#include <CSRMatrix.hpp>
Public Member Functions | |
CSRMatrix (const Vector< ValueType > &values, const Vector< IndexType > &colIdxs, const Vector< IndexType > &rowOffs) | |
Constructor for CSRMatrix. | |
CSRMatrix (const Executor exec) | |
~CSRMatrix ()=default | |
Default destructor. | |
const Executor & | exec () const |
Get the executor associated with this matrix. | |
IndexType | nRows () const |
Get the number of rows in the matrix. | |
IndexType | nNonZeros () const |
Get the number of non-zero values in the matrix. | |
Vector< ValueType > & | values () |
Get a reference to values vector. | |
Vector< IndexType > & | colIdxs () |
Get a reference to column indices vector. | |
Vector< IndexType > & | rowOffs () |
Get a reference to row offset vector. | |
const Vector< ValueType > & | values () const |
Get a const reference to values vector. | |
const Vector< IndexType > & | colIdxs () const |
Get a const reference to column indices vector. | |
const Vector< IndexType > & | rowOffs () const |
Get a const reference to row offset vector. | |
CSRMatrix< ValueType, IndexType > | copyToExecutor (Executor dstExec) const |
Copy the matrix to another executor. | |
CSRMatrix< ValueType, IndexType > | copyToHost () const |
Copy the matrix to the host. | |
CSRMatrixView< ValueType, IndexType > | view () |
Get a view representation of the matrix's data. | |
const CSRMatrixView< const ValueType, const IndexType > | view () const |
Get a const view representation of the matrix's data. | |
Sparse matrix class with compact storage by row (CSR) format.
ValueType | The value type of the non-zero entries. |
IndexType | The index type of the rows and columns. |
Definition at line 85 of file CSRMatrix.hpp.
|
inline |
Constructor for CSRMatrix.
values | The non-zero values of the matrix. |
colIdxs | The column indices for each non-zero value. |
rowOffs | The starting index in values/colIdxs for each row. |
Definition at line 96 of file CSRMatrix.hpp.
|
inline |
Definition at line 107 of file CSRMatrix.hpp.
|
default |
Default destructor.
|
inline |
Get a reference to column indices vector.
Definition at line 146 of file CSRMatrix.hpp.
|
inline |
Get a const reference to column indices vector.
Definition at line 164 of file CSRMatrix.hpp.
|
inline |
Copy the matrix to another executor.
dstExec | The destination executor. |
Definition at line 177 of file CSRMatrix.hpp.
|
inline |
Copy the matrix to the host.
Definition at line 193 of file CSRMatrix.hpp.
|
inline |
Get the executor associated with this matrix.
Definition at line 118 of file CSRMatrix.hpp.
|
inline |
Get the number of non-zero values in the matrix.
Definition at line 134 of file CSRMatrix.hpp.
|
inline |
Get the number of rows in the matrix.
Definition at line 124 of file CSRMatrix.hpp.
|
inline |
Get a reference to row offset vector.
Definition at line 152 of file CSRMatrix.hpp.
|
inline |
Get a const reference to row offset vector.
Definition at line 170 of file CSRMatrix.hpp.
|
inline |
Get a reference to values vector.
Definition at line 140 of file CSRMatrix.hpp.
|
inline |
Get a const reference to values vector.
Definition at line 158 of file CSRMatrix.hpp.
|
inline |
Get a view representation of the matrix's data.
Definition at line 202 of file CSRMatrix.hpp.
|
inline |
Get a const view representation of the matrix's data.
Definition at line 211 of file CSRMatrix.hpp.