|
opm-simulators
|
A small fixed-size square matrix class for use in CUDA kernels. More...
#include <MiniMatrix.hpp>
Public Types | |
| using | value_type = T |
| using | size_type = std::size_t |
| using | array_type = std::array< T, dimension *dimension > |
Public Member Functions | |
| OPM_HOST_DEVICE | MiniMatrix ()=default |
| Default constructor. More... | |
| OPM_HOST_DEVICE | MiniMatrix (std::initializer_list< T > init) |
| Constructor from initializer list. More... | |
| template<class Type , int n, int m> | |
| MiniMatrix (MatrixBlock< Type, n, m > mb) | |
| OPM_HOST_DEVICE | MiniMatrix (const T &value) |
| OPM_HOST_DEVICE T * | operator[] (size_type row) |
| Access row for further column indexing. More... | |
| OPM_HOST_DEVICE const T * | operator[] (size_type row) const |
| Access row for further column indexing (const version). More... | |
| OPM_HOST_DEVICE auto | begin () |
| Get iterator to beginning of data. | |
| OPM_HOST_DEVICE auto | end () |
| Get iterator to end of data. | |
| OPM_HOST_DEVICE auto | begin () const |
| Get const iterator to beginning of data. | |
| OPM_HOST_DEVICE auto | end () const |
| Get const iterator to end of data. | |
| OPM_HOST_DEVICE T * | data () |
| Get pointer to raw data. | |
| OPM_HOST_DEVICE const T * | data () const |
| Get const pointer to raw data. | |
| OPM_HOST_DEVICE void | fill (const T &value) |
| Fill all elements with a value. More... | |
| OPM_HOST_DEVICE MiniMatrix & | operator+= (const MiniMatrix &other) |
| Add another matrix to this one (element-wise). More... | |
| OPM_HOST_DEVICE MiniMatrix | operator+ (const MiniMatrix &other) const |
| Add two matrices (element-wise). More... | |
| OPM_HOST_DEVICE MiniMatrix & | operator-= (const MiniMatrix &other) |
| Subtract another matrix from this one (element-wise). More... | |
| OPM_HOST_DEVICE MiniMatrix | operator- (const MiniMatrix &other) const |
| Subtract two matrices (element-wise). More... | |
| OPM_HOST_DEVICE MiniMatrix & | operator= (const T &scalar) |
| OPM_HOST_DEVICE std::array< T, dimension > | operator* (const std::array< T, dimension > &x) const |
| Matrix-vector multiplication: y = A * x. More... | |
| OPM_HOST_DEVICE MiniMatrix & | operator*= (const MiniMatrix &B) |
| Matrix-matrix multiplication: C = A * B. More... | |
| OPM_HOST_DEVICE MiniMatrix | operator* (const MiniMatrix &B) const |
| Matrix-matrix multiplication: C = A * B. More... | |
| OPM_HOST_DEVICE Opm::gpuistl::MiniVector< T, dimension > | operator* (const Opm::gpuistl::MiniVector< T, dimension > &x) const |
| Matrix-vector multiplication: y = A * x, with MiniVector. More... | |
| OPM_HOST_DEVICE MiniMatrix & | operator*= (const T &scalar) |
| OPM_HOST_DEVICE MiniMatrix | operator+= (const T &scalar) |
Static Public Member Functions | |
| static OPM_HOST_DEVICE constexpr size_type | size () |
| Get matrix dimension. | |
A small fixed-size square matrix class for use in CUDA kernels.
| T | Element type. |
| dimension | Number of rows and columns (matrix is dimension x dimension). |
|
default |
Default constructor.
Elements are default-initialized.
|
inline |
Constructor from initializer list.
| init | Initializer list of elements (row-major order). |
|
inline |
Fill all elements with a value.
| value | Value to fill. |
|
inline |
Matrix-vector multiplication: y = A * x.
| x | Input vector (length = dimension) |
|
inline |
Matrix-matrix multiplication: C = A * B.
| B | Right-hand side matrix |
|
inline |
Matrix-vector multiplication: y = A * x, with MiniVector.
| x | Input MiniVector (length = dimension) |
|
inline |
Matrix-matrix multiplication: C = A * B.
| B | Right-hand side matrix |
|
inline |
Add two matrices (element-wise).
| other | Matrix to add. |
|
inline |
Add another matrix to this one (element-wise).
| other | Matrix to add. |
|
inline |
Subtract two matrices (element-wise).
| other | Matrix to subtract. |
|
inline |
Subtract another matrix from this one (element-wise).
| other | Matrix to subtract. |
|
inline |
Access row for further column indexing.
| row | Row index. |
|
inline |
Access row for further column indexing (const version).
| row | Row index. |