NeoN
WIP Prototype of a modern OpenFOAM core
|
A view struct to allow easy read/write on all executors. More...
#include <CSRMatrix.hpp>
Public Member Functions | |
CSRMatrixView (const View< ValueType > &valueView, const View< IndexType > &colIdxsView, const View< IndexType > &rowOffsView) | |
Constructor for CSRMatrixView. | |
~CSRMatrixView ()=default | |
Default destructor. | |
KOKKOS_INLINE_FUNCTION ValueType & | entry (const IndexType i, const IndexType j) const |
Retrieve a reference to the matrix element at position (i,j). | |
KOKKOS_INLINE_FUNCTION ValueType & | entry (const IndexType offset) const |
Direct access to a value given the offset. | |
Public Attributes | |
View< ValueType > | values |
View to the values of the CSR matrix. | |
View< IndexType > | colIdxs |
View to the column indices of the CSR matrix. | |
View< IndexType > | rowOffs |
View to the row offsets for the CSR matrix. | |
A view struct to allow easy read/write on all executors.
ValueType | The value type of the non-zero entries. |
IndexType | The index type of the rows and columns. |
Definition at line 20 of file CSRMatrix.hpp.
|
inline |
Constructor for CSRMatrixView.
valueView | View of the non-zero values of the matrix. |
colIdxsView | View of the column indices for each non-zero value. |
rowOffsView | View of the starting index in values/colIdxs for each row. |
Definition at line 28 of file CSRMatrix.hpp.
|
default |
Default destructor.
|
inline |
Retrieve a reference to the matrix element at position (i,j).
i | The row index. |
j | The column index. |
Definition at line 47 of file CSRMatrix.hpp.
|
inline |
Direct access to a value given the offset.
offset | The offset, from 0, to the value. |
Definition at line 69 of file CSRMatrix.hpp.
View<IndexType> NeoN::la::CSRMatrixView< ValueType, IndexType >::colIdxs |
View to the column indices of the CSR matrix.
Definition at line 72 of file CSRMatrix.hpp.
View<IndexType> NeoN::la::CSRMatrixView< ValueType, IndexType >::rowOffs |
View to the row offsets for the CSR matrix.
Definition at line 73 of file CSRMatrix.hpp.
View<ValueType> NeoN::la::CSRMatrixView< ValueType, IndexType >::values |
View to the values of the CSR matrix.
Definition at line 71 of file CSRMatrix.hpp.