8 template<
int Rows,
int Cols,
typename Scalar>
28template<
int Rows,
int Cols,
typename Scalar>
76 #ifdef UseManualInlining
77 __attribute__((always_inline))
84 return _values[rowIndex * Cols + colIndex];
94 #ifdef UseManualInlining
95 __attribute__((always_inline))
102 return _values[rowIndex * Cols + colIndex];
115 template <
typename NewScalarType>
132#include "tarch/la/ShallowMatrix.cpph"
#define assertion5(expr, param0, param1, param2, param3, param4)
Shallow matrix wrapping an existing array.
int size() const
Returns the number of total elements in the matrix.
std::string toString() const
tarch::la::Matrix< Rows, Cols, NewScalarType > convertScalar() const
Convert the scalar type.
Scalar * _values
Values of the matrix components.
const Scalar * data() const
Scalar & operator()(int rowIndex, int colIndex)
Returns element at given row and column index (from 0..size-1).
ShallowMatrix(const ShallowMatrix ©)
Shallow copy.
ShallowMatrix & operator=(const ShallowMatrix ©)
Shallow copy.
int rows() const
Returns the number of rows in the matrix.
Scalar * data()
Return pointer back to original data.
std::string toPrettyString(int numberOfDigits=4) const
int cols() const
Returns the number of columns in the matrix.
ShallowMatrix(Scalar *values)
Constructs a non-initialized matrix.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.