FLAMES 0.1.0
Matrix-Empowered HLS Library
Loading...
Searching...
No Matches
flames::Mat< T, n_rows, n_cols, type > Class Template Reference

Matrix. More...

#include <core.hpp>

Public Types

using element_type = T
 
using value_type = T
 

Public Member Functions

 Mat ()
 Construct a new Mat object.
 
 Mat (T val)
 Construct a new Mat object with initial value.
 
 Mat (const Mat &mat)
 Copy constructor from a Mat object.
 
template<typename T2 , size_t _rows, size_t _cols, MatType _type, std::enable_if_t<!std::is_same< T, T2 >::value &&type==_type &&n_rows==_rows &&n_cols==_cols, bool > = true>
 Mat (const Mat< T2, _rows, _cols, _type > &mat)
 
template<typename T2 , size_t _rows, size_t _cols, MatType _type, std::enable_if_t< type !=_type &&n_rows==_rows &&n_cols==_cols, bool > = true>
 Mat (const Mat< T2, _rows, _cols, _type > &mat)
 
 Mat (const std::vector< T > &vec)
 Construct a new Mat object from std::vector.
 
template<typename T2 >
 Mat (std::initializer_list< T2 > list)
 
 Mat (Init init)
 
 Mat (const T *ptr, InitAfterwards opt=InitAfterwards::NONE)
 Construct a new Mat object from raw data pointer.
 
 Mat (T *const ptr, InitAfterwards opt=InitAfterwards::NONE)
 
 ~Mat ()
 Destroy the Mat object.
 
operator[] (size_t index) const
 Get read only element by row major index from the data array.
 
T & operator[] (size_t index)
 Get writeable element by row major index from the data array.
 
operator() (size_t r, size_t c) const
 Get read only data element by row index and column index.
 
T & operator() (size_t r, size_t c)
 Get writeable data element by row index and column index.
 
void setValue (T val)
 Set all elements of the matrix to a value.
 
void setZero ()
 Set all elements of the matrix to zero.
 
bool read (const std::string &file_name)
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 >
Matadd (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R)
 Matrix plus matrix with same MatType.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::NORMAL &&(type1 !=MatType::NORMAL||type2 !=MatType::NORMAL), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into NORMAL.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::DIAGONAL &&(type1 !=MatType::DIAGONAL||type2 !=MatType::DIAGONAL), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into DIAGONAL.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SCALAR &&(type1 !=MatType::SCALAR||type2 !=MatType::SCALAR), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into SCALAR.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::UPPER &&(type1 !=MatType::UPPER||type2 !=MatType::UPPER), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into UPPER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::LOWER &&(type1 !=MatType::LOWER||type2 !=MatType::LOWER), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into LOWER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SUPPER &&(type1 !=MatType::SUPPER||type2 !=MatType::SUPPER), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into SUPPER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SLOWER &&(type1 !=MatType::SLOWER||type2 !=MatType::SLOWER), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into SLOWER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SYM &&(type1 !=MatType::SYM||type2 !=MatType::SYM), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into SYM.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::ASYM &&(type1 !=MatType::ASYM||type2 !=MatType::ASYM), bool > = true>
Matadd (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix plus matrix into ASYM.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Matadd (const M< T2, n_rows, n_cols, type2, _unused... > &mat_R)
 Matrix self plus a matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 >
Matsub (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R)
 Matrix minus matrix with same MatType.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::NORMAL &&(type1 !=MatType::NORMAL||type2 !=MatType::NORMAL), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into NORMAL.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::DIAGONAL &&(type1 !=MatType::DIAGONAL||type2 !=MatType::DIAGONAL), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into DIAGONAL.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SCALAR &&(type1 !=MatType::SCALAR||type2 !=MatType::SCALAR), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into SCALAR.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::UPPER &&(type1 !=MatType::UPPER||type2 !=MatType::UPPER), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into UPPER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::LOWER &&(type1 !=MatType::LOWER||type2 !=MatType::LOWER), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into LOWER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SUPPER &&(type1 !=MatType::SUPPER||type2 !=MatType::SUPPER), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into SUPPER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SLOWER &&(type1 !=MatType::SLOWER||type2 !=MatType::SLOWER), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into SLOWER.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SYM &&(type1 !=MatType::SYM||type2 !=MatType::SYM), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into SYM.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::ASYM &&(type1 !=MatType::ASYM||type2 !=MatType::ASYM), bool > = true>
Matsub (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R)
 Matrix minus matrix into ASYM.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Matsub (const M< T2, n_rows, n_cols, type2, _unused... > &mat_R)
 Matrix self minus a matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename ScalarT , typename T2 , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Matmul (const M< T2, n_rows, n_cols, type, _unused... > &mat, ScalarT s)
 Matrix times a scalar.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename ScalarT , typename T2 , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Matmul (const M< T2, n_rows, n_cols, type, _unused... > &mat, std::complex< ScalarT > s)
 Matrix times a complex number.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, int AP_W, typename T2 >
Matmul (const M< T2, n_rows, n_cols, type, _unused... > &mat, ap_int< AP_W > s)
 Matrix times ap_int integer.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, int AP_W, int AP_I, ap_q_mode AP_Q, ap_o_mode AP_O, int AP_N, typename T2 >
Matmul (const M< T2, n_rows, n_cols, type, _unused... > &mat, ap_fixed< AP_W, AP_I, AP_Q, AP_O, AP_N > s)
 Matrix times ap_fixed float.
 
template<typename ScalarT , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Matmul (ScalarT s)
 Matrix self multiply a scalar.
 
template<typename ScalarT , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Matmul (std::complex< ScalarT > s)
 Matrix self multiply a complex number.
 
template<int AP_W>
Matmul (ap_int< AP_W > s)
 Matrix self multiply ap_int integer.
 
template<int AP_W, int AP_I, ap_q_mode AP_Q, ap_o_mode AP_O, int AP_N>
Matmul (ap_fixed< AP_W, AP_I, AP_Q, AP_O, AP_N > s)
 Matrix self multiply ap_fixed float.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(!(std::is_same< T1, bool >::value) &&!(std::is_same< T2, bool >::value)) &&((type1==MatType::NORMAL &&type2==MatType::NORMAL)||(type1==MatType::NORMAL &&type2==MatType::SYM)||(type1==MatType::SYM &&type2==MatType::NORMAL)||(type1==MatType::SYM &&type2==MatType::SYM)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 General matrix matrix multiplication.(Including SYM or NORMAL matrix times a SYM or NORMAL matrix )
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times a upper triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times a lower triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times a strict upper triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Normal matrix or symmetric matrix times a strict lower triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a strict upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a strict lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&(type2==MatType::NORMAL||type2==MatType::SYM)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Diagonal matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SCALAR &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SCALAR &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::UPPER &&type1==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::LOWER &&type1==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::SUPPER &&type1==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a strict upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::SLOWER &&type1==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a strict lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::ASYM &&type1==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type2==MatType::SYM||type2==NORMAL) &&type1==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Scalar matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a strict upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a strict lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Upper triangle matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a strict upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a strict lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Lower triangle matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times a upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times a lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times a strict upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<!(type1==MatType::SUPPER &&n_rows==1) &&!(type2==MatType::SLOWER &&cols_==1) &&(type1==MatType::SUPPER &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle times a strict lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict upper triangle matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a strict upper triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a strict lower triangle matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Strict lower triangle matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::DIAGONAL), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times a diagonal matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::SCALAR), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times a scalar matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::UPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric times a upper triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::LOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times a lower triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::SUPPER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times a strict upper triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::SLOWER), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times a strict lower triangular matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&(type2==MatType::NORMAL||type2==MatType::SYM)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times a normal matrix or a symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::ASYM), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Anti-symmetric matrix times an anti-symmetric matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(std::is_same< T1, bool >::value) &&((type1==MatType::NORMAL &&type2==MatType::NORMAL)||(type1==MatType::NORMAL &&type2==MatType::SYM)||(type1==MatType::SYM &&type2==MatType::NORMAL)||(type1==MatType::SYM &&type2==MatType::SYM)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Bool matrix times a matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(std::is_same< T2, bool >::value &&!std::is_same< T1, bool >::value) &&((type1==MatType::NORMAL &&type2==MatType::NORMAL)||(type1==MatType::NORMAL &&type2==MatType::SYM)||(type1==MatType::SYM &&type2==MatType::NORMAL)||(type1==MatType::SYM &&type2==MatType::SYM)), bool > = true>
Matmul (const M1< T1, rows_, comm, type1, _unused1... > &mat_L, const M2< T2, comm, cols_, type2, _unused2... > &mat_R)
 Matrix times a bool matrix.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , size_t rows_, size_t cols_, MatType type1, MatType type2, std::enable_if_t< rows_==n_rows &&cols_==n_cols &&type1==type &&type2==type, bool > = true>
Matemul (const M1< T1, rows_, cols_, type1, _unused1... > &mat_L, const M2< T2, rows_, cols_, type2, _unused2... > &mat_R)
 Element-wise product of two matrices.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Matcol (const M< T2, rows_, cols_, type2, _unused... > &mat, size_t c)
 Take a column of a matrix by index.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
void col (size_t c, const M< T2, rows_, cols_, type2, _unused... > &mat)
 
Mat< T, n_rows, 1, MatType::NORMALcol (size_t c) const
 Take a column of a matrix by index and make a copy.
 
MatViewCol< T, n_rows, n_cols, MatType::NORMAL, MType< type > > col_ (size_t index) const
 Take a column of a matrix by index as a read only view.
 
MatRefCol< T, n_rows, n_cols, MatType::NORMAL, MType< type > > col_ (size_t index)
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Matrow (const M< T2, rows_, cols_, type2, _unused... > &mat, size_t r)
 Take a row of a matrix by index.
 
Mat< T, 1, n_cols, MatType::NORMALrow (size_t r) const
 Take a row of a matrix by index and make a copy.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Matcols (const M< T2, rows_, cols_, type2, _unused... > &mat, size_t first_col)
 Take a row of a matrix by index as a read only view.
 
template<size_t _cols>
Mat< T, n_rows, _cols, MatType::NORMALcols (size_t first_col)
 Take successive columns of a matrix by index and make a copy.
 
template<size_t first_col, size_t last_col>
MatViewCols< first_col, last_col, T, n_rows, n_cols, MatType::NORMAL, MType< type > > Cols_ () const
 Take seccessive columns of a matrix by indexes as a read only view.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Matrows (const M< T2, rows_, cols_, type2, _unused... > &mat, size_t first_row)
 Take successive rows of a matrix by index.
 
template<size_t _rows>
Mat< T, _rows, n_cols, MatType::NORMALrows (size_t first_row)
 Take successive rows of a matrix by index and make a copy.
 
template<size_t first_row, size_t last_row>
MatViewRows< first_row, last_row, T, n_rows, n_cols, MatType::NORMAL, MType< type > > Rows_ () const
 Take successive rows of a matrix by indexes as a read only view.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, typename M2 , typename T1 , MatType type1, size_t rows_, size_t cols_>
Matrows (const M1< T1, rows_, cols_, type1, _unused1... > &mat, M2 vector)
 Take discrete rows of a matrix by container.
 
template<size_t _rows, typename M2 >
Mat< T, _rows, n_cols, MatType::NORMALrows (M2 vector)
 Take discrete rows of a matrix by container and make a copy.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, typename M2 , typename T1 , MatType type1, size_t rows_, size_t cols_>
Matcols (const M1< T1, rows_, cols_, type1, _unused1... > &mat, M2 vector)
 Take discrete cols of a matrix by container.
 
template<size_t _cols, typename M2 >
Mat< T, n_rows, _cols, MatType::NORMALcols (M2 vector)
 Take discrete cols of a matrix by container and make a copy.
 
Matabs_ ()
 Apply 'abs' (absolute value) to itself.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Matt (const M< T2, n_cols, n_rows, type2, _unused... > &mat)
 Transpose.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::NORMAL, bool > = true>
Mat< T, n_cols, n_rows, type > t () const
 Transpose NORMAL matrix as a copy.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t<(_type==MatType::DIAGONAL||_type==MatType::SCALAR||_type==MatType::SYM), bool > = true>
Mat t () const
 Transpose DIAGONAL/SCALAR/SYM matrix as a copy.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::UPPER, bool > = true>
Mat< T, n_rows, n_cols, MatType::LOWERt () const
 Transpose UPPER matrix as a copy.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::LOWER, bool > = true>
Mat< T, n_rows, n_cols, MatType::UPPERt () const
 Transpose LOWER matrix as a copy.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::SUPPER, bool > = true>
Mat< T, n_rows, n_cols, MatType::SLOWERt () const
 Transpose SUPPER matrix as a copy.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::SLOWER, bool > = true>
Mat< T, n_rows, n_cols, MatType::SLOWERt () const
 Transpose SLOWER matrix as a copy.
 
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::ASYM, bool > = true>
Mat t () const
 Transpose ASYM matrix as a copy.
 
MatViewT< T, n_cols, n_rows, tType(type)> t_ ()
 Transpose as a read only view.
 
MatViewT< T, n_cols, n_rows, tType(type)> t_ () const
 
MattSelf ()
 In-place transpose.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 >
Matopp (const M< T2, n_rows, n_cols, type, _unused... > &mat)
 Calculate the opposite of a matrix.
 
Mat opp () const
 Calculate the opposite of a matrix and make a copy.
 
MatViewOpp< T, n_rows, n_cols, type > opp_ () const
 Matrix opposite as a read only view.
 
MatoppSelf ()
 In-place matrix opposite.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
MatdiagMat (const M< T2, n_rows, n_cols, type2, _unused... > &mat)
 Take the diagonal of a matrix.
 
Mat< T, n_rows, n_cols, MatType::DIAGONALdiagMat () const
 Take the diagonal of a matrix and make a copy.
 
MatViewDiagMat< T, n_rows, n_cols, MatType::DIAGONAL, MType< type > > diagMat_ () const
 Take the diagonal of a matrix as a read only view.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
MatdiagVec (const M< T2, n_rows, n_rows, type2, _unused... > &mat)
 Take the diagonal vector of a matrix.
 
Vec< T, n_rows > diagVec () const
 Take the diagonal vector of a matrix and make a copy.
 
MatViewDiagVec< T, n_rows, 1, MatType::NORMAL, MType< type > > diagVec_ () const
 Take the diagonal vector of a matrix as a read only view.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
MatdiagRowVec (const M< T2, n_cols, n_cols, type2, _unused... > &mat)
 Take the diagonal row vector of a matrix.
 
RowVec< T, n_cols > diagRowVec () const
 Take the diagonal row vector of a matrix and make a copy.
 
MatViewDiagRowVec< T, 1, n_cols, MatType::NORMAL, MType< type > > diagRowVec_ () const
 Take the diagonal row vector of a matrix as a read only view.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
MatoffDiag (const M< T2, n_cols, n_rows, type2, _unused... > &mat)
 Take the off diagonal of a matrix.
 
Mat< T, n_rows, n_cols, MatType::NORMALoffDiag () const
 Take the off diagonal of a matrix and make a copy.
 
MatViewOffDiag< T, n_rows, n_cols, MatType::NORMAL, MType< type > > offDiag_ () const
 Take the diagonal of a matrix as a read only view.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
MatinvDiag (const M< T2, n_cols, n_rows, type2, _unused... > &mat)
 Inverse the diagonal matrix.
 
Mat invDiag () const
 Inverse the diagonal matrix and makes a copy.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
MatinvNSA (const M< T2, n_rows, n_cols, type2, _unused... > &mat, size_t iter=4)
 Matrix inverse using Newton-Schulz iterative method (NSA).
 
Mat invNSA (size_t iter=4) const
 Matrix inverse using Newton-Schulz iterative method (NSA) as a copy.
 
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, typename coeff_type >
MatinvINSA (const M< T2, n_rows, n_cols, type2, _unused... > &mat, size_t iter=3, coeff_type beta=2)
 Matrix inverse using improved Newton-Schulz iterative method (INSA).
 
template<typename coeff_type >
Mat invINSA (size_t iter=3, coeff_type beta=1.0) const
 Matrix inverse using improved Newton-Schulz iterative method (INSA) as a copy.
 
template<typename Tp = T>
Tp power () const
 
value () const
 Get the value from 1x1 matrix.
 
T & value ()
 Get the writeable value from 1x1 matrix.
 
void print (const std::string &str="", std::ostream &os=std::cout) const
 Print the matrix.
 
MatView< T, n_rows, n_cols, type > operator+ () const
 The unary plus operator.
 
MatViewOpp< T, n_rows, n_cols, type > operator- () const
 The unary minus operator.
 
T * rawDataPtr ()
 Get the raw data array pointer.
 
const T * rawDataPtr () const
 
void _tryAssign (size_t r, size_t c, T value)
 Try to assign a value to a specific position.
 
void _tryAssignOutRange (size_t r, size_t c, T value)
 Try to assign a value to a specific position that may have out-of-range index.
 
void _tryPlus (size_t r, size_t c, T value)
 Try to plus a value to a specific position.
 
template<typename Tmp , typename M , typename Comm , typename Zero >
void _sa_read_first_col_L (size_t i, Tmp &tmp_L, const M &mat_L, size_t begin_shift, Comm __attribute__((unused)) _comm_foo, Zero zero) const
 Systolic array read the first column from the left matrix.
 
template<typename Tmp , typename M , typename Comm , typename Zero >
void _sa_read_first_row_R (size_t i, Tmp &tmp_R, const M &mat_R, size_t begin_shift, Comm __attribute__((unused)) _comm_foo, Zero zero) const
 Systolic array read the first column from the right matrix.
 
template<typename T1 , typename T2 , typename HLSVec >
void _sa_multiply (const T1 &tmp_L, const T2 &tmp_R, const HLSVec &use_assign)
 Systolic array multiplication.
 
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t comm>
Mat_systolicArrayMul (const M1< T1, n_rows, comm, type1, _unused1... > &mat_L, const M2< T2, comm, n_cols, type2, _unused2... > &mat_R, size_t begin_shift=0, size_t end_shift=0)
 The systolic array multiplication.
 

Static Public Member Functions

static constexpr size_t size () noexcept
 Get the matrix size of storage.
 

Public Attributes

_data [type==MatType::NORMAL ? n_rows *n_cols :type==MatType::DIAGONAL ? n_rows :type==MatType::SCALAR ? 1 :type==MatType::SUPPER ?(n_rows - 1) *n_rows/2 :type==MatType::SLOWER ?(n_rows - 1) *n_rows/2 :type==MatType::ASYM ?(n_rows - 1) *n_rows/2 :(1+n_rows) *n_rows/2]
 The raw data array in row major.
 

Friends

class MatView< T, n_rows, n_cols, type >
 
class MatViewOpp< T, n_rows, n_cols, type >
 
class MatViewT< T, n_cols, n_rows, type >
 
class MatViewT< T, n_rows, n_cols, type >
 
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
class MatViewDiagMat
 
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
class MatViewDiagVec
 
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
class MatViewDiagRowVec
 
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
class MatViewOffDiag
 
template<typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
class MatViewCol
 
template<typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
class MatViewRow
 
template<size_t first_col, size_t last_col, typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
class MatViewCols
 
template<size_t first_row, size_t last_row, typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
class MatViewRows
 
template<typename View_T_T , size_t T_n_rows, size_t T_n_cols, size_t T_n_slices, MatType T_type>
class Tensor
 

Detailed Description

template<typename T, size_t n_rows, size_t n_cols, MatType type>
class flames::Mat< T, n_rows, n_cols, type >

Matrix.

The matrix design is hardware optimized, with easy pragma configuration to be specified by the user. The use of this class follows the routine of C++, with some exceptions for the sake of better hardware performance. Please check out descriptions of class member functions for details.

Template Parameters
TElement type.
n_rowsNumber of rows.
n_colsNumber of columns.
typematrix type.

Member Typedef Documentation

◆ element_type

template<typename T , size_t n_rows, size_t n_cols, MatType type>
using flames::Mat< T, n_rows, n_cols, type >::element_type = T

◆ value_type

template<typename T , size_t n_rows, size_t n_cols, MatType type>
using flames::Mat< T, n_rows, n_cols, type >::value_type = T

Constructor & Destructor Documentation

◆ Mat() [1/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( )
inline

Construct a new Mat object.

This is the default constructor. You can set the array partition using macro FLAMES_MAT_PARTITION_COMPLETE to set a complete array partition and FLAMES_MAT_PARTITION_FACTOR to set a block partition with the specific factor.

Note
Data is stored as a row major sequence.

◆ Mat() [2/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( T val)
inline

Construct a new Mat object with initial value.

All values are set to the initial value you specify. You can configure macro FLAMES_MAT_SET_VALUE_UNROLL_FACTOR to set the initialization unroll factor.

Parameters
valThe initial value.
Here is the call graph for this function:

◆ Mat() [3/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( const Mat< T, n_rows, n_cols, type > & mat)
inline

Copy constructor from a Mat object.

Macro FLAMES_MAT_COPY_UNROLL_FACTOR to configure the unrolling factor. You can set the array partition using macro FLAMES_MAT_PARTITION_COMPLETE to set a complete array partition and FLAMES_MAT_PARTITION_FACTOR to set a block partition with the specific factor.

Parameters
matThe matrix to be copied.
Here is the call graph for this function:

◆ Mat() [4/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename T2 , size_t _rows, size_t _cols, MatType _type, std::enable_if_t<!std::is_same< T, T2 >::value &&type==_type &&n_rows==_rows &&n_cols==_cols, bool > = true>
flames::Mat< T, n_rows, n_cols, type >::Mat ( const Mat< T2, _rows, _cols, _type > & mat)
inline
Here is the call graph for this function:

◆ Mat() [5/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename T2 , size_t _rows, size_t _cols, MatType _type, std::enable_if_t< type !=_type &&n_rows==_rows &&n_cols==_cols, bool > = true>
flames::Mat< T, n_rows, n_cols, type >::Mat ( const Mat< T2, _rows, _cols, _type > & mat)
inline
Here is the call graph for this function:

◆ Mat() [6/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( const std::vector< T > & vec)
inline

Construct a new Mat object from std::vector.

Parameters
vecThe std::vector storing data in row major.

You can set the array partition using macro FLAMES_MAT_PARTITION_COMPLETE to set a complete array partition and FLAMES_MAT_PARTITION_FACTOR to set a block partition with the specific factor.

Here is the call graph for this function:

◆ Mat() [7/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename T2 >
flames::Mat< T, n_rows, n_cols, type >::Mat ( std::initializer_list< T2 > list)
inline
Here is the call graph for this function:

◆ Mat() [8/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( Init init)
inline

◆ Mat() [9/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( const T * ptr,
InitAfterwards opt = InitAfterwards::NONE )
inlineexplicit

Construct a new Mat object from raw data pointer.

Parameters
ptrThe raw data pointer.
optOption if initialization.
Note
This function should only be used by view classes and is therefore marked as private.
Here is the call graph for this function:

◆ Mat() [10/10]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::Mat ( T *const ptr,
InitAfterwards opt = InitAfterwards::NONE )
inlineexplicit
Here is the call graph for this function:

◆ ~Mat()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::Mat< T, n_rows, n_cols, type >::~Mat ( )
inline

Destroy the Mat object.

So far there is nothing to do.

Member Function Documentation

◆ _sa_multiply()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename T1 , typename T2 , typename HLSVec >
void flames::Mat< T, n_rows, n_cols, type >::_sa_multiply ( const T1 & tmp_L,
const T2 & tmp_R,
const HLSVec & use_assign )
inline

Systolic array multiplication.

Template Parameters
T1The left matrix element type.
T2The right matrix element type.
HLSVecThe HLS vector type for control whether assigning or adding.
Parameters
tmp_LThe left tmp matrix.
tmp_RThe right tmp matrix.
use_assignThe HLS vector for controlling whether assigning or adding.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _sa_read_first_col_L()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename Tmp , typename M , typename Comm , typename Zero >
void flames::Mat< T, n_rows, n_cols, type >::_sa_read_first_col_L ( size_t i,
Tmp & tmp_L,
const M & mat_L,
size_t begin_shift,
Comm __attribute__((unused)) _comm_foo,
Zero zero ) const
inline

Systolic array read the first column from the left matrix.

Template Parameters
TmpThe temp mat type.
MThe left matrix type.
CommThe
Zero
Parameters
iThe iteration number.
tmp_LThe temp matrix.
mat_LThe left matrix.
begin_shiftThe begin shift value.
zeroThe zero value.
Here is the caller graph for this function:

◆ _sa_read_first_row_R()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename Tmp , typename M , typename Comm , typename Zero >
void flames::Mat< T, n_rows, n_cols, type >::_sa_read_first_row_R ( size_t i,
Tmp & tmp_R,
const M & mat_R,
size_t begin_shift,
Comm __attribute__((unused)) _comm_foo,
Zero zero ) const
inline

Systolic array read the first column from the right matrix.

Template Parameters
TmpThe temp mat type.
MThe right matrix type.
CommThe common size (column number of the left matrix and the row number of the right matrix) as a type.
ZeroThe zero element type.
Parameters
iThe iteration number.
tmp_LThe temp matrix.
mat_LThe right matrix.
begin_shiftThe begin shift value.
zeroThe zero value.
Here is the caller graph for this function:

◆ _systolicArrayMul()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t comm>
Mat & flames::Mat< T, n_rows, n_cols, type >::_systolicArrayMul ( const M1< T1, n_rows, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, n_cols, type2, _unused2... > & mat_R,
size_t begin_shift = 0,
size_t end_shift = 0 )
inline

The systolic array multiplication.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
commThe common size (column number of the left matrix and the row number of the right matrix) as a type.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
begin_shiftThe begin shift value.
end_shiftThe end shift value.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ _tryAssign()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
void flames::Mat< T, n_rows, n_cols, type >::_tryAssign ( size_t r,
size_t c,
T value )
inline

Try to assign a value to a specific position.

This is useful when we do not want to check the MatType.

Note
This will not check the boundary! If that is not sure, use ._tryAssignOutRange() instead.
Parameters
rThe row index.
cThe column index.
valueThe value to be assigned.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _tryAssignOutRange()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
void flames::Mat< T, n_rows, n_cols, type >::_tryAssignOutRange ( size_t r,
size_t c,
T value )
inline

Try to assign a value to a specific position that may have out-of-range index.

This is useful when we do not want to check the MatType and the index range.

Parameters
rThe row index.
cThe column index.
valueThe value to be assigned.
Here is the call graph for this function:

◆ _tryPlus()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
void flames::Mat< T, n_rows, n_cols, type >::_tryPlus ( size_t r,
size_t c,
T value )
inline

Try to plus a value to a specific position.

This is useful when we do not want to check the MatType.

Note
This will not check the boundary!
Parameters
rThe row index.
cThe column index.
valueThe value to add.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ abs_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat & flames::Mat< T, n_rows, n_cols, type >::abs_ ( )
inline

Apply 'abs' (absolute value) to itself.

Note
This does not support complex numbers yet.
Returns
(Mat&) The processed matrix (a reference to 'this').
Here is the call graph for this function:

◆ add() [1/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 >
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type, _unused2... > & mat_R )
inline

Matrix plus matrix with same MatType.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').
Here is the call graph for this function:
Here is the caller graph for this function:

◆ add() [2/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::NORMAL &&(type1 !=MatType::NORMAL||type2 !=MatType::NORMAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into NORMAL.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [3/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::DIAGONAL &&(type1 !=MatType::DIAGONAL||type2 !=MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into DIAGONAL.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [4/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SCALAR &&(type1 !=MatType::SCALAR||type2 !=MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into SCALAR.

The result is stored to 'this'.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [5/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::UPPER &&(type1 !=MatType::UPPER||type2 !=MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into UPPER.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [6/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::LOWER &&(type1 !=MatType::LOWER||type2 !=MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into LOWER.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [7/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SUPPER &&(type1 !=MatType::SUPPER||type2 !=MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into SUPPER.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [8/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SLOWER &&(type1 !=MatType::SLOWER||type2 !=MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into SLOWER.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [9/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SYM &&(type1 !=MatType::SYM||type2 !=MatType::SYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into SYM.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [10/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::ASYM &&(type1 !=MatType::ASYM||type2 !=MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix plus matrix into ASYM.

The result is stored to 'this'. You may configure FLAMES_MAT_PLUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing addition in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The addition result (a reference to 'this').

◆ add() [11/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::add ( const M< T2, n_rows, n_cols, type2, _unused... > & mat_R)
inline

Matrix self plus a matrix.

Template Parameters
MThe matrix type of the plus matrix.
_unused(unused)
T2The plus matrix element type.
type2The plus matrix MatType.
Parameters
mat_RThe plus matrix.
Returns
(Mat&) The addition result (a reference to 'this').
Here is the call graph for this function:

◆ col() [1/3]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Mat & flames::Mat< T, n_rows, n_cols, type >::col ( const M< T2, rows_, cols_, type2, _unused... > & mat,
size_t c )
inline

Take a column of a matrix by index.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
Parameters
matThe original matrix.
cThe column index.
Returns
(Mat&) The certain column(a column vector) (a reference to 'this') .
Here is the call graph for this function:

◆ col() [2/3]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat< T, n_rows, 1, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::col ( size_t c) const
inline

Take a column of a matrix by index and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .col(Mat, int) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .col_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Parameters
cThe column index.
Returns
(Mat<T, n_rows, 1, MatType::NORMAL>)(column vector) The certain column vector copy.

◆ col() [3/3]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
void flames::Mat< T, n_rows, n_cols, type >::col ( size_t c,
const M< T2, rows_, cols_, type2, _unused... > & mat )
inline

◆ col_() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatRefCol< T, n_rows, n_cols, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::col_ ( size_t index)
inline

◆ col_() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewCol< T, n_rows, n_cols, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::col_ ( size_t index) const
inline

Take a column of a matrix by index as a read only view.

Returns
(MatViewCol<T, n_rows, n_cols, MatType::NORMAL, MType<type>>) The read only a column vector view.
Here is the caller graph for this function:

◆ cols() [1/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, typename M2 , typename T1 , MatType type1, size_t rows_, size_t cols_>
Mat & flames::Mat< T, n_rows, n_cols, type >::cols ( const M1< T1, rows_, cols_, type1, _unused1... > & mat,
M2 vector )
inline

Take discrete cols of a matrix by container.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
M1The original matrix type.
_unused1(unused)
M2The vector type.
T1The original matrix element type.
type1The matrix MatType.
rows_The row number of the matrix.
cols_The column number of the matrix.
Parameters
matThe original matrix.
vectorThe vector.
Returns
(Mat&) The discrete cols(a normal matrix) (a reference to 'this') .

◆ cols() [2/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Mat & flames::Mat< T, n_rows, n_cols, type >::cols ( const M< T2, rows_, cols_, type2, _unused... > & mat,
size_t first_col )
inline

Take a row of a matrix by index as a read only view.

Returns
(MatViewRow<Index, T, n_rows, n_cols, MatType::NORMAL, MType<type>>) The read only a row vector view.

Take successive columns of a matrix by index.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
type2The matrix MatType.
Parameters
matThe original matrix.
first_colThe first column index.
Returns
(Mat&) The successive columns(a normal matrix) (a reference to 'this') .

◆ cols() [3/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t _cols, typename M2 >
Mat< T, n_rows, _cols, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::cols ( M2 vector)
inline

Take discrete cols of a matrix by container and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .cols(Mat, vector) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .cols_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
M2The vector type.
Parameters
vectorThe vector.
Returns
(Mat&) The discrete cols(a normal matrix) (a reference to 'this') .

◆ cols() [4/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t _cols>
Mat< T, n_rows, _cols, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::cols ( size_t first_col)
inline

Take successive columns of a matrix by index and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .cols(Mat, int) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .cols_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
_colsThe number of columns taken.
Parameters
first_colThe first column index.
Returns
(Mat&) The successive columns(a normal matrix) (a reference to 'this') .

◆ Cols_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t first_col, size_t last_col>
MatViewCols< first_col, last_col, T, n_rows, n_cols, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::Cols_ ( ) const
inline

Take seccessive columns of a matrix by indexes as a read only view.

Returns
(MatViewCols<first_row, last_row, T, n_rows, n_cols, MatType::NORMAL, MType<type>>) The read only columns vector view.

◆ diagMat() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat< T, n_rows, n_cols, MatType::DIAGONAL > flames::Mat< T, n_rows, n_cols, type >::diagMat ( ) const
inline

Take the diagonal of a matrix and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .diagMat(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .diagMat_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Returns
(Mat<T, n_rows, n_cols, MatType::DIAGONAL>) The diagonal matrix copy.

◆ diagMat() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::diagMat ( const M< T2, n_rows, n_cols, type2, _unused... > & mat)
inline

Take the diagonal of a matrix.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
Parameters
matThe original matrix.
Returns
(Mat&) The diagonal matrix (a reference to 'this').

◆ diagMat_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewDiagMat< T, n_rows, n_cols, MatType::DIAGONAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::diagMat_ ( ) const
inline

Take the diagonal of a matrix as a read only view.

Returns
(MatViewDiagMat<T, n_rows, n_cols, MatType::DIAGONAL, MType<type>>) The read only diagonal matrix view.
Here is the caller graph for this function:

◆ diagRowVec() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
RowVec< T, n_cols > flames::Mat< T, n_rows, n_cols, type >::diagRowVec ( ) const
inline

Take the diagonal row vector of a matrix and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .diagRowVec(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .diagRowVec_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Returns
(RowVec<T, n_cols>) The diagonal row vector copy.

◆ diagRowVec() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::diagRowVec ( const M< T2, n_cols, n_cols, type2, _unused... > & mat)
inline

Take the diagonal row vector of a matrix.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
Parameters
matThe original matrix.
Returns
(Mat&) The diagonal vector (a reference to 'this').

◆ diagRowVec_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewDiagRowVec< T, 1, n_cols, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::diagRowVec_ ( ) const
inline

Take the diagonal row vector of a matrix as a read only view.

Returns
(MatViewDiagRowVec<T, 1, n_cols, MatType::NORMAL, MType<type>> ) The read only diagonal row vector view.

◆ diagVec() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Vec< T, n_rows > flames::Mat< T, n_rows, n_cols, type >::diagVec ( ) const
inline

Take the diagonal vector of a matrix and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .diagVec(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .diagVec_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Returns
(Vec<T, n_rows>) The diagonal vector copy.

◆ diagVec() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::diagVec ( const M< T2, n_rows, n_rows, type2, _unused... > & mat)
inline

Take the diagonal vector of a matrix.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
Parameters
matThe original matrix.
Returns
(Mat&) The diagonal vector (a reference to 'this').

◆ diagVec_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewDiagVec< T, n_rows, 1, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::diagVec_ ( ) const
inline

Take the diagonal vector of a matrix as a read only view.

Returns
(MatViewDiagVec<T, n_rows, n_cols, MatType::DIAGONAL, MType<type>>) The read only diagonal vector view.

◆ emul()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , size_t rows_, size_t cols_, MatType type1, MatType type2, std::enable_if_t< rows_==n_rows &&cols_==n_cols &&type1==type &&type2==type, bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::emul ( const M1< T1, rows_, cols_, type1, _unused1... > & mat_L,
const M2< T2, rows_, cols_, type2, _unused2... > & mat_R )
inline

Element-wise product of two matrices.

You can configure the macro FLAMES_MAT_EMUL_UNROLL_FACTOR to determine the parallelism.

Note
It now only supports element-wise product of two matrices of the same dimension and MatType.
Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
rows_The number of rows.
cols_The number of columns.
type1The left matrix MatType.
type2The right matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The element-wise product result (a reference to 'this').
Here is the call graph for this function:
Here is the caller graph for this function:

◆ invDiag() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat flames::Mat< T, n_rows, n_cols, type >::invDiag ( ) const
inline

Inverse the diagonal matrix and makes a copy.

Note
This matrix should be DIAGONAL.
Returns
(Mat) The inverse matrix copy.

◆ invDiag() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::invDiag ( const M< T2, n_cols, n_rows, type2, _unused... > & mat)
inline

Inverse the diagonal matrix.

This can also be used for calculating the inverse of the diagonal part.

Note
This should only be applied to matrix ('this') with MatType as DIAGONAL. If this rule is violated, a static assert will raise an error. This, however, allows the paramater matrix to be non DIAGONAL. But you need to make sure it is a diagonal matrix in mathematics otherwise the inverse only applies to its diagonal.
Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
type2The original matrix MatType.
Parameters
matThe original matrix.
Returns
(Mat&) The inverse matrix (a reference to 'this').
Here is the caller graph for this function:

◆ invINSA() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, typename coeff_type >
Mat & flames::Mat< T, n_rows, n_cols, type >::invINSA ( const M< T2, n_rows, n_cols, type2, _unused... > & mat,
size_t iter = 3,
coeff_type beta = 2 )
inline

Matrix inverse using improved Newton-Schulz iterative method (INSA).

This implements a coefficient to the original NSA method to accelerate convergence.

Note
This function has not been implemented!
Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
type2The original matrix MatType.
coeff_typeThe coefficient data type.
Parameters
matThe original matrix.
iterThe number of iterations (default as 3).
betaThe coefficient applied to each iteration (default as 2).
Returns
(Mat&) The inverse matrix (a reference to 'this').
Here is the caller graph for this function:

◆ invINSA() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename coeff_type >
Mat flames::Mat< T, n_rows, n_cols, type >::invINSA ( size_t iter = 3,
coeff_type beta = 1.0 ) const
inline

Matrix inverse using improved Newton-Schulz iterative method (INSA) as a copy.

Template Parameters
coeff_typeThe coefficient data type.
Parameters
iterThe number of iterations (default as 3).
betaThe coefficient applied to each iteration (default as 2).
Returns
(Mat) The inverse matrix copy.
Here is the call graph for this function:

◆ invNSA() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::invNSA ( const M< T2, n_rows, n_cols, type2, _unused... > & mat,
size_t iter = 4 )
inline

Matrix inverse using Newton-Schulz iterative method (NSA).

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
type2The original matrix MatType.
Parameters
matThe original matrix.
iterThe number of iterations (default as 4).
Returns
(Mat&) The inverse matrix (a reference to 'this').
Here is the call graph for this function:
Here is the caller graph for this function:

◆ invNSA() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat flames::Mat< T, n_rows, n_cols, type >::invNSA ( size_t iter = 4) const
inline

Matrix inverse using Newton-Schulz iterative method (NSA) as a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .invNSA(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization.
Parameters
iterThe number of iterations (default as 4).
Returns
(Mat) The inverse matrix copy.
Here is the call graph for this function:

◆ mul() [1/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<int AP_W, int AP_I, ap_q_mode AP_Q, ap_o_mode AP_O, int AP_N>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( ap_fixed< AP_W, AP_I, AP_Q, AP_O, AP_N > s)
inline

Matrix self multiply ap_fixed float.

The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
AP_Wap_int W param.
AP_Iap_int I param.
AP_Qap_int Q param.
AP_Oap_int O param.
AP_Nap_int N param.
Parameters
sThe float.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [2/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<int AP_W>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( ap_int< AP_W > s)
inline

Matrix self multiply ap_int integer.

The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
AP_Wap_int W param.
Parameters
sThe integer.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [3/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(!(std::is_same< T1, bool >::value) &&!(std::is_same< T2, bool >::value)) &&((type1==MatType::NORMAL &&type2==MatType::NORMAL)||(type1==MatType::NORMAL &&type2==MatType::SYM)||(type1==MatType::SYM &&type2==MatType::NORMAL)||(type1==MatType::SYM &&type2==MatType::SYM)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

General matrix matrix multiplication.(Including SYM or NORMAL matrix times a SYM or NORMAL matrix )

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel. (This is implemented of using systolic array.)

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [4/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
commThe column number of the right matrix (should be the same as n_cols of 'this').
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [5/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [6/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [7/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times a upper triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [8/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times a lower triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [9/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times a strict upper triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [10/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type1==MatType::NORMAL||type1==MatType::SYM) &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Normal matrix or symmetric matrix times a strict lower triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [11/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [12/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [13/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [14/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [15/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a strict upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [16/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a strict lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [17/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&(type2==MatType::NORMAL||type2==MatType::SYM)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [18/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::DIAGONAL &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Diagonal matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [19/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SCALAR &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a scalar matrix.

The result is stored to 'this'.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [20/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SCALAR &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [21/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::UPPER &&type1==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [22/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::LOWER &&type1==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [23/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::SUPPER &&type1==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a strict upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [24/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::SLOWER &&type1==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a strict lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [25/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type2==MatType::ASYM &&type1==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [26/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<((type2==MatType::SYM||type2==NORMAL) &&type1==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Scalar matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [27/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [28/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [29/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [30/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [31/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a strict upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [32/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a strict lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [33/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [34/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::UPPER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Upper triangle matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [35/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [36/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [37/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [38/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [39/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a strict upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.bb
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [40/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a strict lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [41/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [42/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::LOWER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Lower triangle matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [43/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [44/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [45/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times a upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [46/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times a lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [47/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times a strict upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [48/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<!(type1==MatType::SUPPER &&n_rows==1) &&!(type2==MatType::SLOWER &&cols_==1) &&(type1==MatType::SUPPER &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle times a strict lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [49/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [50/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SUPPER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict upper triangle matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [51/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [52/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [53/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [54/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [55/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a strict upper triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.bb
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [56/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a strict lower triangle matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [57/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [58/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::SLOWER &&(type2==MatType::SYM||type2==MatType::NORMAL)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Strict lower triangle matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [59/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times a diagonal matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [60/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times a scalar matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [61/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric times a upper triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [62/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times a lower triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [63/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times a strict upper triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [64/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times a strict lower triangular matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [65/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&(type2==MatType::NORMAL||type2==MatType::SYM)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times a normal matrix or a symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel. (This is implemented of using systolic array.)

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [66/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(type1==MatType::ASYM &&type2==MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Anti-symmetric matrix times an anti-symmetric matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
commThe column number of the right matrix (should be the same as n_cols of 'this').
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [67/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(std::is_same< T1, bool >::value) &&((type1==MatType::NORMAL &&type2==MatType::NORMAL)||(type1==MatType::NORMAL &&type2==MatType::SYM)||(type1==MatType::SYM &&type2==MatType::NORMAL)||(type1==MatType::SYM &&type2==MatType::SYM)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Bool matrix times a matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel. (This is implemented of using systolic array.)

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type (should be bool).
T2The right matrix element type.
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [68/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, size_t rows_, size_t cols_, size_t comm, std::enable_if_t<(std::is_same< T2, bool >::value &&!std::is_same< T1, bool >::value) &&((type1==MatType::NORMAL &&type2==MatType::NORMAL)||(type1==MatType::NORMAL &&type2==MatType::SYM)||(type1==MatType::SYM &&type2==MatType::NORMAL)||(type1==MatType::SYM &&type2==MatType::SYM)), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M1< T1, rows_, comm, type1, _unused1... > & mat_L,
const M2< T2, comm, cols_, type2, _unused2... > & mat_R )
inline

Matrix times a bool matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel. (This is implemented of using systolic array.)

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type .
T2The right matrix element type (should be bool).
type1The left matrix MatType.
type2The right matrix MatType.
rows_The row number of the left matrix (should be the same as rows of 'this').
cols_The column number of the right matrix (should be the same as n_cols of 'this').
commThe common number (the column number of the left matrix and the row number of the right matrix).
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The multiplication result (a reference to 'this').

◆ mul() [69/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, int AP_W, int AP_I, ap_q_mode AP_Q, ap_o_mode AP_O, int AP_N, typename T2 >
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M< T2, n_rows, n_cols, type, _unused... > & mat,
ap_fixed< AP_W, AP_I, AP_Q, AP_O, AP_N > s )
inline

Matrix times ap_fixed float.

The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
MThe matrix type.
_unused(unused)
AP_Wap_fixed W param.
AP_Iap_fixed I param.
AP_Qap_fixed Q param.
AP_Oap_fixed O param.
AP_Nap_fixed N param.
T2The matrix element type.
Parameters
matThe matrix.
sThe float.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [70/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, int AP_W, typename T2 >
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M< T2, n_rows, n_cols, type, _unused... > & mat,
ap_int< AP_W > s )
inline

Matrix times ap_int integer.

The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
MThe matrix type.
_unused(unused)
AP_Wap_int W param.
T2The matrix element type.
Parameters
matThe matrix.
sThe integer.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [71/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename ScalarT , typename T2 , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M< T2, n_rows, n_cols, type, _unused... > & mat,
ScalarT s )
inline

Matrix times a scalar.

This scalar is C++ arithmetic types, like double and int. The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
MThe matrix type.
_unused(unused)
ScalarTThe scalar type.
T2The matrix element type.
Parameters
matThe matrix.
sThe scalar.(The scalar here is a number. NOT the SCALAR which is a square matrix,despite their functions are similar)
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mul() [72/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename ScalarT , typename T2 , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( const M< T2, n_rows, n_cols, type, _unused... > & mat,
std::complex< ScalarT > s )
inline

Matrix times a complex number.

This scalar is std::complex. The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
MThe matrix type.
_unused(unused)
ScalarTThe scalar type.
T2The matrix element type.
Parameters
matThe matrix.
sThe complex number.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [73/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename ScalarT , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( ScalarT s)
inline

Matrix self multiply a scalar.

This scalar is C++ arithmetic types, like double and int. The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
ScalarTThe scalar type.
Parameters
sThe scalar.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ mul() [74/74]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename ScalarT , std::enable_if_t< std::is_arithmetic< std::remove_cv_t< std::remove_reference_t< ScalarT > > >::value, bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::mul ( std::complex< ScalarT > s)
inline

Matrix self multiply a complex number.

The result is stored to 'this'. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing multiplication in parallel.

Template Parameters
ScalarTThe scalar type.
Parameters
sThe complex number.
Returns
(Mat&) The multiplication result (a reference to 'this').
Here is the call graph for this function:

◆ offDiag() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat< T, n_rows, n_cols, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::offDiag ( ) const
inline

Take the off diagonal of a matrix and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .offDiag(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .offDiag_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Returns
(Mat<T, n_rows, n_cols, MatType::NORMAL>) The off diagonal matrix copy.

◆ offDiag() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::offDiag ( const M< T2, n_cols, n_rows, type2, _unused... > & mat)
inline

Take the off diagonal of a matrix.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
Parameters
matThe original matrix.
Returns
(Mat&) The off diagonal matrix (a reference to 'this').

◆ offDiag_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewOffDiag< T, n_rows, n_cols, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::offDiag_ ( ) const
inline

Take the diagonal of a matrix as a read only view.

Returns
(MatViewOffDiag<T, n_rows, n_cols, MatType::NORMAL, MType<type>>) The read only off diagonal matrix view.
Here is the caller graph for this function:

◆ operator()() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T & flames::Mat< T, n_rows, n_cols, type >::operator() ( size_t r,
size_t c )
inline

Get writeable data element by row index and column index.

Parameters
rThe row index (starting from 0).
cThe column index (staring from 0).
Returns
(T) The writeable data element.

◆ operator()() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T flames::Mat< T, n_rows, n_cols, type >::operator() ( size_t r,
size_t c ) const
inline

Get read only data element by row index and column index.

Parameters
rThe row index (starting from 0).
cThe column index (staring from 0).
Returns
(T) The read only data element.

◆ operator+()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatView< T, n_rows, n_cols, type > flames::Mat< T, n_rows, n_cols, type >::operator+ ( ) const
inline

The unary plus operator.

Returns
(MatView<T, n_rows, n_cols, type>) Return the MatView of the matrix.

◆ operator-()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewOpp< T, n_rows, n_cols, type > flames::Mat< T, n_rows, n_cols, type >::operator- ( ) const
inline

The unary minus operator.

This is the same as .opp_().

Returns
(MatViewOpp<T, n_rows, n_cols, type>) The read only opposite matrix view.

◆ operator[]() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T & flames::Mat< T, n_rows, n_cols, type >::operator[] ( size_t index)
inline

Get writeable element by row major index from the data array.

If you are not sure which index it is operator() which takes tow index and column index is a better resort.

Parameters
indexThe data array index in row major.
Returns
(T) The writeable data element.
Here is the call graph for this function:

◆ operator[]() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T flames::Mat< T, n_rows, n_cols, type >::operator[] ( size_t index) const
inline

Get read only element by row major index from the data array.

If you are not sure which index it is operator() which takes tow index and column index is a better resort.

Parameters
indexThe data array index in row major.
Returns
(T) The read only data element.
Here is the call graph for this function:

◆ opp() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat flames::Mat< T, n_rows, n_cols, type >::opp ( ) const
inline

Calculate the opposite of a matrix and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .opp(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .opp_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Returns
(Mat) The opposite matrix copy.
Here is the call graph for this function:

◆ opp() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 >
Mat & flames::Mat< T, n_rows, n_cols, type >::opp ( const M< T2, n_rows, n_cols, type, _unused... > & mat)
inline

Calculate the opposite of a matrix.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
Parameters
matThe original matrix.
Returns
(Mat&) The opposite matrix (a reference to 'this').
Here is the call graph for this function:

◆ opp_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewOpp< T, n_rows, n_cols, type > flames::Mat< T, n_rows, n_cols, type >::opp_ ( ) const
inline

Matrix opposite as a read only view.

Returns
(MatViewOpp<T, n_rows, n_cols, type>) The read only view opposite.

◆ oppSelf()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat & flames::Mat< T, n_rows, n_cols, type >::oppSelf ( )
inline

In-place matrix opposite.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Returns
(Mat&) The opposite matrix (a reference to 'this').
Here is the call graph for this function:

◆ power()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename Tp = T>
Tp flames::Mat< T, n_rows, n_cols, type >::power ( ) const
inline
Here is the call graph for this function:

◆ print()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
void flames::Mat< T, n_rows, n_cols, type >::print ( const std::string & str = "",
std::ostream & os = std::cout ) const
inline

Print the matrix.

Parameters
strThe string to print before the matrix.
osThe out stream (default as std::cout).
Here is the caller graph for this function:

◆ rawDataPtr() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T * flames::Mat< T, n_rows, n_cols, type >::rawDataPtr ( )
inline

Get the raw data array pointer.

This operation is dangerous if you are not aware of what you are doing so this function is marked as private.

Returns
(const T*) Raw data pointer.

◆ rawDataPtr() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
const T * flames::Mat< T, n_rows, n_cols, type >::rawDataPtr ( ) const
inline

◆ read()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
bool flames::Mat< T, n_rows, n_cols, type >::read ( const std::string & file_name)
inline
Here is the call graph for this function:

◆ row() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Mat & flames::Mat< T, n_rows, n_cols, type >::row ( const M< T2, rows_, cols_, type2, _unused... > & mat,
size_t r )
inline

Take a row of a matrix by index.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
type2The matrix MatType.
Parameters
matThe original matrix.
rThe row index.
Returns
(Mat&) The certain column(a row vector) (a reference to 'this') .
Here is the call graph for this function:

◆ row() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat< T, 1, n_cols, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::row ( size_t r) const
inline

Take a row of a matrix by index and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .row(Mat, int) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .row_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Parameters
rThe row index.
Returns
(Mat<T, 1, n_cols, MatType::NORMAL>)(row vector) The certain row vector copy.

◆ rows() [1/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, typename M2 , typename T1 , MatType type1, size_t rows_, size_t cols_>
Mat & flames::Mat< T, n_rows, n_cols, type >::rows ( const M1< T1, rows_, cols_, type1, _unused1... > & mat,
M2 vector )
inline

Take discrete rows of a matrix by container.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
M1The original matrix type.
_unused1(unused)
M2The vector type.
T1The original matrix element type.
type1The matrix MatType.
rows_The row number of the matrix.
cols_The column number of the matrix.
Parameters
matThe original matrix.
vectorThe vector.
Returns
(Mat&) The discrete rows(a normal matrix) (a reference to 'this') .

◆ rows() [2/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2, size_t rows_, size_t cols_>
Mat & flames::Mat< T, n_rows, n_cols, type >::rows ( const M< T2, rows_, cols_, type2, _unused... > & mat,
size_t first_row )
inline

Take successive rows of a matrix by index.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
MThe original matrix type.
_unused(unused)
T2The original matrix element type.
type2The matrix MatType.
Parameters
matThe original matrix.
first_rowThe first row index.
Returns
(Mat&) The successive rows(a normal matrix) (a reference to 'this') .

◆ rows() [3/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t _rows, typename M2 >
Mat< T, _rows, n_cols, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::rows ( M2 vector)
inline

Take discrete rows of a matrix by container and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .rows(Mat, vector) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .rows_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
M2The vector type.
Parameters
vectorThe vector.
Returns
(Mat&) The discrete rows(a normal matrix) (a reference to 'this') .

◆ rows() [4/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t _rows>
Mat< T, _rows, n_cols, MatType::NORMAL > flames::Mat< T, n_rows, n_cols, type >::rows ( size_t first_row)
inline

Take successive rows of a matrix by index and make a copy.

Note
This function makes a copy, so if you want to optimize your design, always use .rows(Mat, int) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .rows_() which creates a read only view, and this operation does not copy.

You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

The result is stored to 'this'. You may configure macro FLAMES_MAT_COPY_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do the operation in parallel.

Template Parameters
_rowsThe number of columns taken.
Parameters
first_rowThe first row index.
Returns
(Mat&) The successive rows(a normal matrix) (a reference to 'this') .

◆ Rows_()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t first_row, size_t last_row>
MatViewRows< first_row, last_row, T, n_rows, n_cols, MatType::NORMAL, MType< type > > flames::Mat< T, n_rows, n_cols, type >::Rows_ ( ) const
inline

Take successive rows of a matrix by indexes as a read only view.

Returns
(MatViewRows<first_row, last_row, T, n_rows, n_cols, MatType::NORMAL, MType<type>>) The read only rows vector view.

◆ setValue()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
void flames::Mat< T, n_rows, n_cols, type >::setValue ( T val)
inline

Set all elements of the matrix to a value.

Parameters
valThe value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setZero()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
void flames::Mat< T, n_rows, n_cols, type >::setZero ( )
inline

Set all elements of the matrix to zero.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
static constexpr size_t flames::Mat< T, n_rows, n_cols, type >::size ( )
inlinestaticconstexprnoexcept

Get the matrix size of storage.

This is useful in that matrices of different MatType has the data array of different sizes.

Returns
(constexpr size_t) The data array size.
Here is the caller graph for this function:

◆ sub() [1/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 >
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type, _unused2... > & mat_R )
inline

Matrix minus matrix with same MatType.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sub() [2/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::NORMAL &&(type1 !=MatType::NORMAL||type2 !=MatType::NORMAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into NORMAL.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [3/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::DIAGONAL &&(type1 !=MatType::DIAGONAL||type2 !=MatType::DIAGONAL), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into DIAGONAL.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [4/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SCALAR &&(type1 !=MatType::SCALAR||type2 !=MatType::SCALAR), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into SCALAR.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [5/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::UPPER &&(type1 !=MatType::UPPER||type2 !=MatType::UPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into UPPER.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [6/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::LOWER &&(type1 !=MatType::LOWER||type2 !=MatType::LOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into LOWER.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [7/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SUPPER &&(type1 !=MatType::SUPPER||type2 !=MatType::SUPPER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into SUPPER.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [8/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SLOWER &&(type1 !=MatType::SLOWER||type2 !=MatType::SLOWER), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into SLOWER.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [9/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::SYM &&(type1 !=MatType::SYM||type2 !=MatType::SYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into SYM.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [10/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M1, typename... _unused1, template< class, size_t, size_t, MatType, class... > typename M2, typename... _unused2, typename T1 , typename T2 , MatType type1, MatType type2, std::enable_if_t< type==MatType::ASYM &&(type1 !=MatType::ASYM||type2 !=MatType::ASYM), bool > = true>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M1< T1, n_rows, n_cols, type1, _unused1... > & mat_L,
const M2< T2, n_rows, n_cols, type2, _unused2... > & mat_R )
inline

Matrix minus matrix into ASYM.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
M1The left matrix type.
_unused1(unused)
M2The right matrix type.
_unused2(unused)
T1The left matrix element type.
T2The right matrix element type.
type1The left matrix matrix MatType.
type2The right matrix matrix MatType.
Parameters
mat_LThe left matrix.
mat_RThe right matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').

◆ sub() [11/11]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::sub ( const M< T2, n_rows, n_cols, type2, _unused... > & mat_R)
inline

Matrix self minus a matrix.

The result is stored to 'this'. You may configure FLAMES_MAT_MINUS_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to doing subtraction in parallel.

Template Parameters
MThe matrix type of the minus matrix.
_unused(unused)
T2The minus matrix type.
type2The minus matrix MatType.
Parameters
mat_RThe minus matrix.
Returns
(Mat&) The subtraction result (a reference to 'this').
Here is the call graph for this function:

◆ t() [1/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::NORMAL, bool > = true>
Mat< T, n_cols, n_rows, type > flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose NORMAL matrix as a copy.

You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat<T, n_cols, n_rows, type>) The transpose result as a copy.
Here is the caller graph for this function:

◆ t() [2/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t<(_type==MatType::DIAGONAL||_type==MatType::SCALAR||_type==MatType::SYM), bool > = true>
Mat flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose DIAGONAL/SCALAR/SYM matrix as a copy.

This is actually *this (i.e. the trapsonse is the same as itself).

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat) The transpose result as a copy.

◆ t() [3/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::UPPER, bool > = true>
Mat< T, n_rows, n_cols, MatType::LOWER > flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose UPPER matrix as a copy.

You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat<T, n_rows, n_cols, MatType::LOWER>) The transpose result as a copy.

◆ t() [4/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::LOWER, bool > = true>
Mat< T, n_rows, n_cols, MatType::UPPER > flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose LOWER matrix as a copy.

You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat<T, n_rows, n_cols, MatType::UPPER>) The transpose result as a copy.

◆ t() [5/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::SUPPER, bool > = true>
Mat< T, n_rows, n_cols, MatType::SLOWER > flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose SUPPER matrix as a copy.

You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat<T, n_rows, n_cols, MatType::SLOWER>) The transpose result as a copy.

◆ t() [6/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::SLOWER, bool > = true>
Mat< T, n_rows, n_cols, MatType::SLOWER > flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose SLOWER matrix as a copy.

You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat<T, n_rows, n_cols, MatType::SUPPER>) The transpose result as a copy.

◆ t() [7/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename... _unused, MatType _type = type, typename std::enable_if_t< _type==MatType::ASYM, bool > = true>
Mat flames::Mat< T, n_rows, n_cols, type >::t ( ) const
inline

Transpose ASYM matrix as a copy.

You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Note
This function makes a copy, so if you want to optimize your design, always use .t(Mat) that takes an argument to avoid copy in place other than initialization. They are equivalent in initialization. Another choice is to use .t_() which creates a read only view, and this operation does not copy.
Returns
(Mat) The transpose result as a copy.

◆ t() [8/8]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T2 , MatType type2>
Mat & flames::Mat< T, n_rows, n_cols, type >::t ( const M< T2, n_cols, n_rows, type2, _unused... > & mat)
inline

Transpose.

The result is stored to 'this'. You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Template Parameters
MThe matrix type.
_unused(unused)
T2The original matrix element type.
type2The original matrix MatType.
Parameters
matThe original matrix.
Returns
(Mat&) The transpose matrix (a reference to 'this').

◆ t_() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewT< T, n_cols, n_rows, tType(type)> flames::Mat< T, n_rows, n_cols, type >::t_ ( )
inline

Transpose as a read only view.

Returns
(MatViewT<T, n_cols, n_rows, tType(type)>) The read only view transpose.

◆ t_() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
MatViewT< T, n_cols, n_rows, tType(type)> flames::Mat< T, n_rows, n_cols, type >::t_ ( ) const
inline

◆ tSelf()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat & flames::Mat< T, n_rows, n_cols, type >::tSelf ( )
inline

In-place transpose.

The result is stored to 'this'. You may configure macro FLAMES_MAT_TRANSPOSE_UNROLL_FACTOR or FLAMES_UNROLL_FACTOR to do transpose in parallel.

Returns
(Mat&) The transposed result (a reference to 'this').

◆ value() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T & flames::Mat< T, n_rows, n_cols, type >::value ( )
inline

Get the writeable value from 1x1 matrix.

Returns
(T&) The element reference.

◆ value() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T flames::Mat< T, n_rows, n_cols, type >::value ( ) const
inline

Get the value from 1x1 matrix.

Returns
(T) The element value.
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ MatView< T, n_rows, n_cols, type >

template<typename T , size_t n_rows, size_t n_cols, MatType type>
friend class MatView< T, n_rows, n_cols, type >
friend

◆ MatViewCol

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
friend class MatViewCol
friend

◆ MatViewCols

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t first_col, size_t last_col, typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
friend class MatViewCols
friend

◆ MatViewDiagMat

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
friend class MatViewDiagMat
friend

◆ MatViewDiagRowVec

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
friend class MatViewDiagRowVec
friend

◆ MatViewDiagVec

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
friend class MatViewDiagVec
friend

◆ MatViewOffDiag

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T , size_t View_N, size_t View_N_, MatType View_type, typename type_parent >
friend class MatViewOffDiag
friend

◆ MatViewOpp< T, n_rows, n_cols, type >

template<typename T , size_t n_rows, size_t n_cols, MatType type>
friend class MatViewOpp< T, n_rows, n_cols, type >
friend

◆ MatViewRow

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
friend class MatViewRow
friend

◆ MatViewRows

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<size_t first_row, size_t last_row, typename View_T , size_t View_n_rows, size_t View_n_cols, MatType View_type, typename type_parent >
friend class MatViewRows
friend

◆ MatViewT< T, n_cols, n_rows, type >

template<typename T , size_t n_rows, size_t n_cols, MatType type>
friend class MatViewT< T, n_cols, n_rows, type >
friend

◆ MatViewT< T, n_rows, n_cols, type >

template<typename T , size_t n_rows, size_t n_cols, MatType type>
friend class MatViewT< T, n_rows, n_cols, type >
friend

◆ Tensor

template<typename T , size_t n_rows, size_t n_cols, MatType type>
template<typename View_T_T , size_t T_n_rows, size_t T_n_cols, size_t T_n_slices, MatType T_type>
friend class Tensor
friend

Member Data Documentation

◆ _data

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T flames::Mat< T, n_rows, n_cols, type >::_data[type==MatType::NORMAL ? n_rows *n_cols :type==MatType::DIAGONAL ? n_rows :type==MatType::SCALAR ? 1 :type==MatType::SUPPER ?(n_rows - 1) *n_rows/2 :type==MatType::SLOWER ?(n_rows - 1) *n_rows/2 :type==MatType::ASYM ?(n_rows - 1) *n_rows/2 :(1+n_rows) *n_rows/2]

The raw data array in row major.

You can set the array partition using macro FLAMES_MAT_PARTITION_COMPLETE to set a complete array partition and FLAMES_MAT_PARTITION_FACTOR to set a block partition with the specific factor.


The documentation for this class was generated from the following file: