FLAMES 0.1.0
Matrix-Empowered HLS Library
|
Namespace for the FLAMES library. More...
Classes | |
class | Mat |
Matrix. More... | |
class | MatRef |
class | MatRefCol |
class | MatRefRow |
class | MatView |
Read only view version of a matrix. More... | |
class | MatViewCol |
Read only view version of a certain column as colunm vector. More... | |
class | MatViewCols |
Read only view version of successive columns. More... | |
class | MatViewDiagMat |
Read only view version of a diagonal matrix. More... | |
class | MatViewDiagRowVec |
Read only view version of a diagonal matrix as row vector. More... | |
class | MatViewDiagVec |
Read only view version of a diagonal matrix as vector. More... | |
class | MatViewOffDiag |
Read only view version of a off diagonal. More... | |
class | MatViewOpp |
Read only view version of the opposite of a matrix. More... | |
class | MatViewRow |
Read only view version of a certain row as row vector. More... | |
class | MatViewRows |
Read only view version of successive rows. More... | |
class | MatViewT |
Read only view version of a transposed matrix. More... | |
class | Tensor |
Tensor. More... | |
Typedefs | |
using | MATTYPE_NORMAL = std::integral_constant<int, MatType::NORMAL> |
Normal matrix as a class type. | |
using | MATTYPE_DIAGONAL = std::integral_constant<int, MatType::DIAGONAL> |
Diagonal matrix as a class type. | |
using | MATTYPE_SCALAR = std::integral_constant<int, MatType::SCALAR> |
Scalar matrix matrix as a class type. | |
using | MATTYPE_UPPER = std::integral_constant<int, MatType::UPPER> |
Upper triangular matrix as a class type. | |
using | MATTYPE_LOWER = std::integral_constant<int, MatType::LOWER> |
Lower triangular matrix as a class type. | |
using | MATTYPE_SUPPER = std::integral_constant<int, MatType::SUPPER> |
Strict upper triangular matrix as a class type. | |
using | MATTYPE_SLOWER = std::integral_constant<int, MatType::SLOWER> |
Strict lower triangular matrix as a class type. | |
using | MATTYPE_SYM = std::integral_constant<int, MatType::SYM> |
Symmetrical matrix as a class type. | |
using | MATTYPE_ASYM = std::integral_constant<int, MatType::ASYM> |
Antisymmetrical matrix as a class type. | |
template<int type> | |
using | MType = std::integral_constant<int, type> |
Get the class form of MatType. | |
template<typename T , size_t N> | |
using | Vec = Mat<T, N, 1> |
Column vector. | |
template<typename T , size_t N> | |
using | RowVec = Mat<T, 1, N> |
Row vector. | |
template<int I, int D> | |
using | FxP_s = ap_fixed<I + D + 1, I> |
template<int I, int D> | |
using | FxP = FxP_s<I, D> |
template<int I, int D> | |
using | FxP_u = ap_ufixed<I + D, I> |
Enumerations | |
enum | MatType { NORMAL , DIAGONAL , SCALAR , UPPER , LOWER , SUPPER , SLOWER , SYM , ASYM } |
Matrix type for storage. More... | |
enum class | InitAfterwards { NONE , OPP , TR } |
Afterwards action with initialization. More... | |
enum class | Init { NONE , ZEROS , ONES } |
Functions | |
template<typename T > | |
constexpr MatType | matType () |
Get the MatType value from the class form. | |
constexpr MatType | sumType (MatType type1, MatType type2) noexcept |
Summation type of two matrices. | |
constexpr MatType | mulType (MatType type1, MatType type2, size_t n_rows, size_t comm, size_t n_cols) noexcept |
Multiplication type of two matrices. | |
constexpr MatType | tType (MatType type) noexcept |
Transpose type of a matrix. | |
constexpr size_t | upperRow (size_t index, size_t N) |
Calculate the row index of a upper triangular matrix. | |
constexpr size_t | lowerRow (size_t index, size_t N) |
Calculate the row index of a lower triangular matrix. | |
constexpr size_t | supperRow (size_t index, size_t N) |
Calculate the row index of a strict upper triangular matrix. | |
constexpr size_t | slowerRow (size_t index, size_t N) |
Calculate the row index of 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 , size_t n_rows, size_t n_cols, MatType type1, MatType type2> | |
static Mat< T1, n_rows, n_cols, sumType(type1, type2)> | operator+ (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R) |
Add two matrices and make a copy. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T1 , typename T2 , size_t n_rows, size_t n_cols, MatType type1, MatType type2> | |
static Mat< T1, n_rows, n_cols, type1 > & | operator+= (Mat< T1, n_rows, n_cols, type1 > &mat_L, 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 , size_t n_rows, size_t n_cols, MatType type1, MatType type2> | |
static Mat< T1, n_rows, n_cols, sumType(type1, type2)> | operator- (const M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R) |
Minus two matrices and make a copy. | |
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 n_rows, size_t n_cols, MatType type1, MatType type2> | |
static M1< T1, n_rows, n_cols, type1 > & | operator-= (M1< T1, n_rows, n_cols, type1, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type2, _unused2... > &mat_R) |
Matrix self minus a matrix. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T1 , typename T2 , size_t n_rows, size_t n_cols, MatType type1, MatType type2, std::enable_if_t<(std::is_same< T1, bool >::value), bool > = true> | |
static Mat< T1, n_rows, n_cols, mulType(type1, type2, n_rows, n_cols, n_cols)> | operator*= (Mat< T1, n_rows, n_cols, type1 > &mat, const M< T2, n_cols, n_cols, type2, _unused... > &mat_R) |
Matrix self times a matrix. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T , typename ScalarT , size_t n_rows, size_t n_cols, MatType type, std::enable_if_t< std::is_arithmetic< std::remove_reference_t< ScalarT > >::value, bool > = true> | |
static Mat< T, n_rows, n_cols, type > & | operator*= (const M< T, n_rows, n_cols, type, _unused... > &mat, ScalarT s) |
Matrix self times a scalar. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T , typename ScalarT , size_t n_rows, size_t n_cols, MatType type, std::enable_if_t< std::is_arithmetic< std::remove_reference_t< ScalarT > >::value, bool > = true> | |
static Mat< T, n_rows, n_cols, type > | operator* (const M< T, n_rows, n_cols, type, _unused... > &mat_L, ScalarT s) |
Matrix times a scalar. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T , size_t n_rows, size_t n_cols, MatType type, int AP_W, int AP_I, ap_q_mode AP_Q, ap_o_mode AP_O, int AP_N> | |
static Mat< T, n_rows, n_cols, type > | operator* (const M< T, n_rows, n_cols, type, _unused... > &mat_L, ap_fixed< AP_W, AP_I, AP_Q, AP_O, AP_N > s) |
Matrix times an ap_fixed scalar. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T , typename ScalarT , size_t n_rows, size_t n_cols, MatType type, std::enable_if_t< std::is_arithmetic< std::remove_reference_t< ScalarT > >::value, bool > = true> | |
static Mat< T, n_rows, n_cols, type > | operator* (ScalarT s, const M< T, n_rows, n_cols, type, _unused... > &mat_R) |
Matrix times a scalar. | |
template<template< class, size_t, size_t, MatType, class... > typename M, typename... _unused, typename T , size_t n_rows, size_t n_cols, MatType type, int AP_W, int AP_I, ap_q_mode AP_Q, ap_o_mode AP_O, int AP_N> | |
static Mat< T, n_rows, n_cols, type > | operator* (ap_fixed< AP_W, AP_I, AP_Q, AP_O, AP_N > s, const M< T, n_rows, n_cols, type, _unused... > &mat_R) |
Matrix times an ap_fixed 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 , size_t n_rows, size_t comm, size_t n_cols, MatType type1, MatType type2, std::enable_if_t<(std::is_same< T1, bool >::value), bool > = true> | |
static Mat< T2, n_rows, n_cols, mulType(type1, type2, n_rows, comm, n_cols)> | operator* (const M1< T1, n_rows, comm, type1, _unused1... > &mat_L, const M2< T2, comm, n_cols, type2, _unused2... > &mat_R) |
Matrix 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 , size_t n_rows, size_t comm, size_t n_cols, MatType type1, MatType type2, std::enable_if_t<!(std::is_same< T1, bool >::value), bool > = true> | |
static Mat< T1, n_rows, n_cols, mulType(type1, type2, n_rows, comm, n_cols)> | operator* (const M1< T1, n_rows, comm, type1, _unused1... > &mat_L, const M2< T2, comm, n_cols, type2, _unused2... > &mat_R) |
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 n_rows, size_t n_cols, MatType type> | |
Mat< T1, n_rows, n_cols, type > | operator% (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise product of two matrices. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< bool, n_rows, n_cols, type > | operator== (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise equal comparison. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< bool, n_rows, n_cols, type > | operator!= (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise unequal comparison. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< bool, n_rows, n_cols, type > | operator> (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise greater comparison. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< bool, n_rows, n_cols, type > | operator< (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise less comparison. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< bool, n_rows, n_cols, type > | operator>= (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise greater or equal comparison. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< bool, n_rows, n_cols, type > | operator<= (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise less or equal comparison. | |
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 n_rows, size_t n_cols, MatType type> | |
Mat< T1, n_rows, n_cols, type > | mod (const M1< T1, n_rows, n_cols, type, _unused1... > &mat_L, const M2< T2, n_rows, n_cols, type, _unused2... > &mat_R) |
Element-wise modulus. | |
template<typename Tp = double, 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 L_rows, size_t L_cols, size_t R_rows, size_t R_cols, MatType type, std::enable_if_t< L_rows *L_cols==R_rows *R_cols, bool > = true> | |
Tp | innerProd (const M1< T1, L_rows, L_cols, type, _unused1... > &mat_L, const M2< T2, R_rows, R_cols, type, _unused2... > &mat_R) |
template<typename T , size_t n_rows, size_t n_cols, MatType type> | |
static std::ostream & | operator<< (std::ostream &os, const Mat< T, n_rows, n_cols, type > &mat) |
Print matrix in a out stream. | |
template<typename V > | |
static void | mergeSort (V &vec) |
template<typename V1 , typename V2 > | |
static void | mergeSort (const V1 &in, V2 &out) |
template<typename V > | |
static void | sort (V &vec) |
template<typename V1 , typename V2 > | |
static void | sort (const V1 &in, V2 &out) |
template<typename T , typename I > | |
static void | argmax_4_2 (T in1, T in2, T in3, T in4, I i_in1, I i_in2, I i_in3, I i_in4, T &out1, T &out2, I &i_out1, I &i_out2, bool sorted=false) |
Namespace for the FLAMES library.
When you include 'flames.hpp', this namespace is automatically used.
using flames::FxP = FxP_s<I, D> |
using flames::FxP_s = ap_fixed<I + D + 1, I> |
using flames::FxP_u = ap_ufixed<I + D, I> |
using flames::MATTYPE_ASYM = std::integral_constant<int, MatType::ASYM> |
Antisymmetrical matrix as a class type.
using flames::MATTYPE_DIAGONAL = std::integral_constant<int, MatType::DIAGONAL> |
Diagonal matrix as a class type.
using flames::MATTYPE_LOWER = std::integral_constant<int, MatType::LOWER> |
Lower triangular matrix as a class type.
using flames::MATTYPE_NORMAL = std::integral_constant<int, MatType::NORMAL> |
Normal matrix as a class type.
using flames::MATTYPE_SCALAR = std::integral_constant<int, MatType::SCALAR> |
Scalar matrix matrix as a class type.
using flames::MATTYPE_SLOWER = std::integral_constant<int, MatType::SLOWER> |
Strict lower triangular matrix as a class type.
using flames::MATTYPE_SUPPER = std::integral_constant<int, MatType::SUPPER> |
Strict upper triangular matrix as a class type.
using flames::MATTYPE_SYM = std::integral_constant<int, MatType::SYM> |
Symmetrical matrix as a class type.
using flames::MATTYPE_UPPER = std::integral_constant<int, MatType::UPPER> |
Upper triangular matrix as a class type.
using flames::MType = std::integral_constant<int, type> |
Get the class form of MatType.
type | The MatType enum item value. |
using flames::RowVec = Mat<T, 1, N> |
Row vector.
This is the type alias of Mat and the number of row is set to 1.
T | Element type. |
N | The vector dimension. |
using flames::Vec = Mat<T, N, 1> |
Column vector.
This is the type alias of Mat and the number of columns is set to 1.
T | Element type. |
N | The vector dimension. |
|
strong |
|
strong |
enum flames::MatType |
|
inlinestatic |
Tp flames::innerProd | ( | const M1< T1, L_rows, L_cols, type, _unused1... > & | mat_L, |
const M2< T2, R_rows, R_cols, type, _unused2... > & | mat_R ) |
|
inlineconstexpr |
Calculate the row index of a lower triangular matrix.
index | The data index. |
N | The matrix dimension. |
|
inlineconstexpr |
Get the MatType value from the class form.
T | The MatType class form. |
|
static |
Mat< T1, n_rows, n_cols, type > flames::mod | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise modulus.
This requires the operator %
is defined between both matrix elements.
operator%
, which is the element-wise multiplication. M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlineconstexprnoexcept |
Multiplication type of two matrices.
type1 | The MatType of the left matrix. |
type2 | The MatType of the right matrix. |
n_rows | The number of rows of the left matrix. |
comm | The number of columns of the left matrix and the number of rows of the right matrix. |
n_cols | The number of columns of the right matrix. |
Mat< bool, n_rows, n_cols, type > flames::operator!= | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise unequal comparison.
This function returns a bool matrix.
You can configure the macro FLAMES_MAT_BOOL_OPER_UNROLL_FACTOR
to determine the parallelism.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
Mat< T1, n_rows, n_cols, type > flames::operator% | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise product of two matrices.
You can configure the macro FLAMES_MAT_EMUL_UNROLL_FACTOR
to determine the parallelism.
This internally calls Mat::emul(mat, mat).
The return element type is that of the left matrix.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlinestatic |
Matrix times an ap_fixed scalar.
M | The matrix type. |
_unused | (unused) |
T | The matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
AP_W | ap_int W param. |
AP_I | ap_int I param. |
AP_Q | ap_int Q param. |
AP_O | ap_int O param. |
AP_N | ap_int N param. |
mat_R | The right matrix. |
s | The float. |
|
inlinestatic |
Matrix multiplication.
This operator calls .mul() function. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR
or FLAMES_UNROLL_FACTOR
to doing multiplication in parallel.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The row number of the left matrix. |
comm | The common number (the column number of the left matrix and the row number of the right matrix). |
n_cols | The column number of the right matrix. |
type1 | The left matrix MatType. |
type2 | The right matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlinestatic |
|
inlinestatic |
Matrix times an ap_fixed scalar.
M | The matrix type. |
_unused | (unused) |
T | The matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
AP_W | ap_int W param. |
AP_I | ap_int I param. |
AP_Q | ap_int Q param. |
AP_O | ap_int O param. |
AP_N | ap_int N param. |
mat_L | The left matrix. |
s | The float. |
|
inlinestatic |
Matrix times a scalar.
This operator calls .mul() function. This scalar is C++ arithmetic types, like double and int. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR
or FLAMES_UNROLL_FACTOR
to doing multiplication in parallel.
M | The matrix type. |
_unused | (unused) |
ScalarT | The scalar type. |
T | The matrix element type. |
mat_L | The matrix. |
s | The scalar. |
|
inlinestatic |
Matrix times a scalar.
This operator calls .mul() function. This scalar is C++ arithmetic types, like double and int. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR
or FLAMES_UNROLL_FACTOR
to doing multiplication in parallel.
M | The matrix type. |
_unused | (unused) |
ScalarT | The scalar type. |
T2 | The matrix element type. |
mat_R | The matrix. |
s | The scalar. |
|
inlinestatic |
Matrix self times a scalar.
This operator calls .mul() function. This scalar is C++ arithmetic types, like double and int. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR
or FLAMES_UNROLL_FACTOR
to doing multiplication in parallel.
M | The matrix type. |
_unused | (unused) |
ScalarT | The scalar type. |
T | The matrix element type. |
mat | The matrix. |
s | The scalar. |
|
inlinestatic |
Matrix self times a matrix.
Matrix self times a matrix of a different type.
This operator calls .mul() function. You may configure FLAMES_MAT_SCALAR_TIMES_UNROLL_FACTOR
or FLAMES_UNROLL_FACTOR
to doing multiplication in parallel.
M | The matrix type. |
_unused | (unused) |
ScalarT | The scalar type. |
T2 | The matrix element type. |
mat | The matrix. |
s | The scalar. |
M | The matrix type. |
_unused | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type1 | The left side matrix MatType. |
type2 | The right side matrix MatType. |
mat | The matrix. |
mat_R | The right matrix. |
|
inlinestatic |
Add two matrices and make a copy.
This will call .add() function.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
type1 | The left matrix MatType. |
type2 | The right matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlinestatic |
Matrix self plus a matrix.
M | The right side matrix type. |
_unused | (unused) |
T1 | The left side matrix element type. |
T2 | The right side matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type1 | The left side matrix MatType. |
type2 | The right side matrix MatType. |
mat_L | The left side matrix. |
mat_R | The right side matrix. |
|
inlinestatic |
Minus two matrices and make a copy.
This will call .sub() function.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
type1 | The left matrix MatType. |
type2 | The right matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlinestatic |
Matrix self minus a matrix.
M | The right side matrix type. |
_unused | (unused) |
T1 | The left side matrix element type. |
T2 | The right side matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type1 | The left side matrix MatType. |
type2 | The right side matrix MatType. |
mat_L | The left side matrix. |
mat_R | The right side matrix. |
Mat< bool, n_rows, n_cols, type > flames::operator< | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise less comparison.
This function returns a bool matrix.
You can configure the macro FLAMES_MAT_BOOL_OPER_UNROLL_FACTOR
to determine the parallelism.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlinestatic |
Print matrix in a out stream.
This function calls .print() function.
T | The matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
os | The out stream. |
mat | The matrix. |
Mat< bool, n_rows, n_cols, type > flames::operator<= | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise less or equal comparison.
This function returns a bool matrix.
You can configure the macro FLAMES_MAT_BOOL_OPER_UNROLL_FACTOR
to determine the parallelism.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
Mat< bool, n_rows, n_cols, type > flames::operator== | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise equal comparison.
This function returns a bool matrix.
You can configure the macro FLAMES_MAT_BOOL_OPER_UNROLL_FACTOR
to determine the parallelism.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
Mat< bool, n_rows, n_cols, type > flames::operator> | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise greater comparison.
This function returns a bool matrix.
You can configure the macro FLAMES_MAT_BOOL_OPER_UNROLL_FACTOR
to determine the parallelism.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
Mat< bool, n_rows, n_cols, type > flames::operator>= | ( | const M1< T1, n_rows, n_cols, type, _unused1... > & | mat_L, |
const M2< T2, n_rows, n_cols, type, _unused2... > & | mat_R ) |
Element-wise greater or equal comparison.
This function returns a bool matrix.
You can configure the macro FLAMES_MAT_BOOL_OPER_UNROLL_FACTOR
to determine the parallelism.
M1 | The left matrix type. |
_unused1 | (unused) |
M2 | The right matrix type. |
_unused2 | (unused) |
T1 | The left matrix element type. |
T2 | The right matrix element type. |
n_rows | The number of rows. |
n_cols | The number of columns. |
type | The matrix MatType. |
mat_L | The left matrix. |
mat_R | The right matrix. |
|
inlineconstexpr |
Calculate the row index of a strict lower triangular matrix.
index | The data index. |
N | The matrix dimension. |
|
inlinestatic |
Summation type of two matrices.
type1 | The MatType of the left matrix. |
type2 | The MatType of the right matrix. |
|
inlineconstexpr |
Calculate the row index of a strict upper triangular matrix.
index | The data index. |
N | The matrix dimension. |
Transpose type of a matrix.
type | The MatType of the matrix. |
|
inlineconstexpr |
Calculate the row index of a upper triangular matrix.
index | The data index. |
N | The matrix dimension. |