36 template< std::ptrdiff_t M,
typename MATRIX >
51 template< std::ptrdiff_t M,
typename DST_MATRIX,
typename SRC_MATRIX >
53 auto invert( DST_MATRIX && LVARRAY_RESTRICT_REF dstMatrix,
54 SRC_MATRIX
const & LVARRAY_RESTRICT_REF srcMatrix )
56 static_assert( std::is_floating_point< std::decay_t< decltype( dstMatrix[ 0 ][ 0 ] ) > >::value,
57 "The destination matrix must be contain floating point values." );
69 template< std::ptrdiff_t M,
typename MATRIX >
73 static_assert( std::is_floating_point< std::decay_t< decltype( matrix[ 0 ][ 0 ] ) > >::value,
74 "The matrix must be contain floating point values." );
98 template< std::ptrdiff_t M,
typename DST_VECTOR,
typename SYM_MATRIX_A,
typename VECTOR_B >
101 SYM_MATRIX_A
const & LVARRAY_RESTRICT_REF symMatrixA,
102 VECTOR_B
const & LVARRAY_RESTRICT_REF vectorB )
120 template< std::ptrdiff_t M,
typename DST_VECTOR,
typename SYM_MATRIX_A,
typename VECTOR_B >
123 SYM_MATRIX_A
const & LVARRAY_RESTRICT_REF symMatrixA,
124 VECTOR_B
const & LVARRAY_RESTRICT_REF vectorB )
143 template< std::ptrdiff_t M,
typename DST_MATRIX,
typename SYM_MATRIX_A,
typename MATRIX_B >
146 SYM_MATRIX_A
const & LVARRAY_RESTRICT_REF symMatrixA,
147 MATRIX_B
const & LVARRAY_RESTRICT_REF matrixB )
168 template< std::ptrdiff_t M,
typename DST_SYM_MATRIX,
typename MATRIX_A,
typename SYM_MATRIX_B >
171 MATRIX_A
const & LVARRAY_RESTRICT_REF matrixA,
172 SYM_MATRIX_B
const & LVARRAY_RESTRICT_REF symMatrixB )
184 template< std::ptrdiff_t M,
typename SYM_MATRIX >
199 template< std::ptrdiff_t M,
typename DST_SYM_MATRIX,
typename SRC_SYM_MATRIX >
201 auto symInvert( DST_SYM_MATRIX && LVARRAY_RESTRICT_REF dstSymMatrix,
202 SRC_SYM_MATRIX
const & LVARRAY_RESTRICT_REF srcSymMatrix )
204 static_assert( std::is_floating_point< std::decay_t< decltype( dstSymMatrix[ 0 ] ) > >::value,
205 "The destination matrix must be contain floating point values." );
217 template< std::ptrdiff_t M,
typename SYM_MATRIX >
221 static_assert( std::is_floating_point< std::decay_t< decltype( symMatrix[ 0 ] ) > >::value,
222 "The matrix must be contain floating point values." );
240 template< std::ptrdiff_t M,
typename DST_VECTOR,
typename SYM_MATRIX >
243 SYM_MATRIX
const & LVARRAY_RESTRICT_REF symMatrix )
245 static_assert( std::is_floating_point< std::decay_t< decltype( eigenvalues[ 0 ] ) > >::value,
246 "eigenvalues must be contain floating point values." );
267 template< std::ptrdiff_t M,
typename DST_VECTOR,
typename DST_MATRIX,
typename SYM_MATRIX >
270 DST_MATRIX && LVARRAY_RESTRICT_REF eigenvectors,
271 SYM_MATRIX
const & LVARRAY_RESTRICT_REF symMatrix )
273 static_assert( std::is_floating_point< std::decay_t< decltype( eigenvalues[ 0 ] ) > >::value,
274 "eigenvalues must be contain floating point values." );
275 static_assert( std::is_floating_point< std::decay_t< decltype( eigenvectors[ 0 ][ 0 ] ) > >::value,
276 "eigenvectors must be contain floating point values." );
278 std::forward< DST_MATRIX >( eigenvectors ),
290 template< std::ptrdiff_t M,
typename DST_SYM_MATRIX,
typename SRC_MATRIX >
306 template< std::ptrdiff_t M,
typename DST_MATRIX,
typename SRC_SYM_MATRIX >
constexpr auto invert(DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix)
Invert the source matrix srcMatrix and store the result in dstMatrix.
constexpr void Ri_add_symAijBj(DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SYM_MATRIX_A const &LVARRAY_RESTRICT_REF symMatrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
Multiply the vector vectorB by the symmetric matrix symMatrixA and add the result to dstVector...
constexpr auto determinant(MATRIX const &matrix)
Contains the implementation of arbitrary sized vector and matrix operations.
#define CONSTEXPR_WITHOUT_BOUNDS_CHECK
Expands to constexpr when array bound checking is disabled.
Contains the implementation of the 2x2 and 3x3 matrix operations.
constexpr void Ri_eq_symAijBj(DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SYM_MATRIX_A const &LVARRAY_RESTRICT_REF symMatrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB)
Multiply the vector vectorB by the symmetric matrix symMatrixA and store the result in dstVector...
constexpr void Rij_eq_symAikBjk(DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SYM_MATRIX_A const &LVARRAY_RESTRICT_REF symMatrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB)
Multiply the transpose of matrix matrixB by the symmetric matrix symMatrixA and store the result in d...
constexpr void symEigenvalues(DST_VECTOR &&LVARRAY_RESTRICT_REF eigenvalues, SYM_MATRIX const &LVARRAY_RESTRICT_REF symMatrix)
Compute the eigenvalues of the symmetric matrix symMatrix.
constexpr auto symInvert(SYM_MATRIX &&symMatrix)
Invert the symmetric matrix symMatrix overwritting it.
constexpr void symEigenvectors(DST_VECTOR &&LVARRAY_RESTRICT_REF eigenvalues, DST_MATRIX &&LVARRAY_RESTRICT_REF eigenvectors, SYM_MATRIX const &LVARRAY_RESTRICT_REF symMatrix)
Compute the eigenvalues and eigenvectors of the symmetric matrix symMatrix.
constexpr void Rij_eq_AikSymBklAjl(DST_SYM_MATRIX &&LVARRAY_RESTRICT_REF dstSymMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, SYM_MATRIX_B const &LVARRAY_RESTRICT_REF symMatrixB)
Multiply the transpose of matrix matrixA by the symmetric matrix symMatrixB then by matrixA and store...
constexpr void denseToSymmetric(DST_SYM_MATRIX &&dstSymMatrix, SRC_MATRIX const &srcMatrix)
Convert the upper triangular part of srcMatrix to a symmetric matrix.
constexpr auto invert(MATRIX &&matrix)
Invert the matrix matrix overwritting it.
constexpr void symmetricToDense(DST_MATRIX &&dstMatrix, SRC_SYM_MATRIX const &srcSymMatrix)
Convert the srcSymMatrix into a dense matrix.
constexpr auto symInvert(DST_SYM_MATRIX &&LVARRAY_RESTRICT_REF dstSymMatrix, SRC_SYM_MATRIX const &LVARRAY_RESTRICT_REF srcSymMatrix)
Invert the symmetric matrix srcSymMatrix and store the result in dstSymMatrix.
constexpr auto symDeterminant(SYM_MATRIX const &symMatrix)
#define LVARRAY_HOST_DEVICE
Mark a function for both host and device usage.