CMSIS-DSP  
CMSIS DSP Software Library
 
Loading...
Searching...
No Matches
Abstract syntax tree for fusion

Data Structures

struct  FloatType< E >
 Check if datatype are compatible and accept mixed arithmetic complex with real. More...
 
struct  _Expr< T >
 Expression template. More...
 
struct  _Binary< LHS, RHS, DerivedOp >
 Expression for binary operator. More...
 
struct  _Unary< LHS, DerivedOp >
 Expression for unary operator. More...
 
struct  _UnaryOperator< Scalar, Derived >
 Unary operator. More...
 
struct  _BinaryOperator< ScalarLHS, ScalarRHS, Derived >
 Unary operator. More...
 
struct  _AddOp< ScalarLHS, ScalarRHS >
 Add operator. More...
 
struct  _SubOp< ScalarLHS, ScalarRHS >
 Sub operator. More...
 
struct  _MulOp< ScalarLHS, ScalarRHS >
 Mul operator. More...
 
struct  _NegOp< Scalar >
 Neg operator. More...
 
struct  _NoOp< Scalar >
 No operator. More...
 
struct  _ConjugateOp< Scalar >
 Conjugate operator. More...
 

Functions

template<typename DA >
constexpr bool has_vector_inst ()
 Determines if vector datatype supports vector instruction on a current architecture.
 
template<typename DA >
constexpr bool has_predicate ()
 Check if predicated instructions are supported.
 
template<typename DA >
constexpr bool is_mixed ()
 Check if expression contains a mix of complex / real operations.
 
template<typename A , typename B >
constexpr bool same_nb_lanes ()
 Check same number of lanes is used.
 
template<typename A >
constexpr bool is_complex ()
 Check if vector / matrix contains complex numbers.
 
template<typename A >
constexpr bool is_float ()
 Determines if datatype is a float (double, float, complex ...).
 
template<typename A >
constexpr bool is_fixed ()
 Determines if datatype is fixed (Q31,Q15, complex<Q15> ...).
 
template<typename DA >
constexpr bool has_predicate_inst ()
 Determines if datatype has predicated loop for current architecture.
 
template<typename DA >
constexpr bool is_scalar ()
 Determines if scalar datatype (not vector, vectorview, matrix, matrixview)
 
template<typename DA >
constexpr bool must_use_matrix_idx ()
 Check if datatype can only be used as a matrix (no vector addressing)
 
template<typename DA , typename DB >
constexpr bool vector_idx_pair ()
 Check if both datatype have vector indexing and are same scalar datatype.
 
template<typename DA >
constexpr bool is_only_vector ()
 Check if has vector indexing.
 
template<typename DA , typename DB >
constexpr bool must_use_matrix_idx_pair ()
 Check if datatypes have same scalar datatype and no vector indexing.
 
template<typename DA , typename DB >
constexpr vector_length_t static_length ()
 Static length.
 
template<typename DA , typename DB >
constexpr bool same_static_length ()
 Check compatibility of length.
 
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >() &&is_only_vector< VA >() &&is_only_vector< VB >() &&(!IsDynamic< VA >::value||!IsDynamic< VB >::value), bool >::type = true>
DotResult< DotFieldResult< VA, VB > > dot (const VA &a, const VB &b)
 Dot product.
 
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >() &&(!IsDynamic< VA >::value||!IsDynamic< VB >::value), bool >::type = true>
void swap (VA &&a, VB &&b)
 Swap vectors.
 

Description


Data Structure Documentation

◆ arm_cmsis_dsp::FloatType

struct arm_cmsis_dsp::FloatType
template<typename E>
struct arm_cmsis_dsp::FloatType< E >

Check if datatype are compatible and accept mixed arithmetic complex with real.

Template Parameters
ALHS datatype
BRHS datatype
Returns
True if types are compatible

◆ arm_cmsis_dsp::_Expr

struct arm_cmsis_dsp::_Expr
template<typename T>
struct arm_cmsis_dsp::_Expr< T >

Expression template.

Template Parameters
TDatatype representing the expression

Public Member Functions

T & derived ()
 Derived datatype.
 
T const & derived () const
 Derived datatype.
 
Scalar const operator[] (const index_t i) const
 Vector indexing in the expression.
 
Scalar const operator() (const index_t r, const index_t c) const
 Matrix indexing.
 
Vector const vector_op (const index_t i) const
 Vector operation at given index.
 
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index with loop predicate.
 
Vector const matrix_op (const index_t r, const index_t c) const
 Matrix operation at index.
 
Vector const matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const
 Matrix operation at index with tail predication.
 
vector_length_t length () const
 Length of result.
 
vector_length_t rows () const
 Number of rows for result.
 
vector_length_t columns () const
 Number of columns for result.
 

Member Function Documentation

◆ columns()

vector_length_t columns ( ) const
inline

Number of columns for result.

Returns
Number of columns

◆ derived() [1/2]

T & derived ( )
inline

Derived datatype.

Returns
Return the derived datatype

◆ derived() [2/2]

T const & derived ( ) const
inline

Derived datatype.

Returns
Return the derived datatype

◆ length()

vector_length_t length ( ) const
inline

Length of result.

Returns
The vector length.

◆ matrix_op()

Vector const matrix_op ( const index_t  r,
const index_t  c 
) const
inline

Matrix operation at index.

Parameters
[in]rrow index
[in]ccolumn index
Returns
Evaluation of matrix expression at index

◆ matrix_op_tail()

Vector const matrix_op_tail ( const index_t  r,
const index_t  c,
const vector_length_t  remaining 
) const
inline

Matrix operation at index with tail predication.

Parameters
[in]rrow index
[in]ccolumn index
[in]remainingRemaining elements in the loop
Returns
Evaluation of matrix operation at index

◆ operator()()

Scalar const operator() ( const index_t  r,
const index_t  c 
) const
inline

Matrix indexing.

Parameters
[in]rRow index
[in]cColumn index
Returns
Element at index

◆ operator[]()

Scalar const operator[] ( const index_t  i) const
inline

Vector indexing in the expression.

Parameters
[in]iIndex
Returns
The result of the vector indexer

◆ rows()

vector_length_t rows ( ) const
inline

Number of rows for result.

Returns
Number of rows

◆ vector_op()

Vector const vector_op ( const index_t  i) const
inline

Vector operation at given index.

Parameters
[in]iVector index
Returns
Evaluation of vector at the index

◆ vector_op_tail()

Vector const vector_op_tail ( const index_t  i,
const vector_length_t  remaining 
) const
inline

Vector operation at index with loop predicate.

Parameters
[in]iVector index
[in]remainingRemaining elements in the loop
Returns
Evaluation of vector at index with tail predication

◆ arm_cmsis_dsp::_Binary

struct arm_cmsis_dsp::_Binary
template<typename LHS, typename RHS, typename DerivedOp>
struct arm_cmsis_dsp::_Binary< LHS, RHS, DerivedOp >

Expression for binary operator.

Template Parameters
LHSLeft hand side datatype
RHSRight hand side datatype
DerivedOpOperator for the binary operation

Additional Inherited Members

- Public Member Functions inherited from _Expr< _Binary< LHS, RHS, DerivedOp > >
_Binary< LHS, RHS, DerivedOp > & derived ()
 Derived datatype.
 
_Binary< LHS, RHS, DerivedOp > const & derived () const
 Derived datatype.
 
Scalar const operator[] (const index_t i) const
 Vector indexing in the expression.
 
Scalar const operator() (const index_t r, const index_t c) const
 Matrix indexing.
 
Vector const vector_op (const index_t i) const
 Vector operation at given index.
 
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index with loop predicate.
 
Vector const matrix_op (const index_t r, const index_t c) const
 Matrix operation at index.
 
Vector const matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const
 Matrix operation at index with tail predication.
 
vector_length_t length () const
 Length of result.
 
vector_length_t rows () const
 Number of rows for result.
 
vector_length_t columns () const
 Number of columns for result.
 

◆ arm_cmsis_dsp::_Unary

struct arm_cmsis_dsp::_Unary
template<typename LHS, typename DerivedOp>
struct arm_cmsis_dsp::_Unary< LHS, DerivedOp >

Expression for unary operator.

Template Parameters
LHSLeft hand side datatype
DerivedOpOperator for the binary operation

Additional Inherited Members

- Public Member Functions inherited from _Expr< _Unary< LHS, DerivedOp > >
_Unary< LHS, DerivedOp > & derived ()
 Derived datatype.
 
_Unary< LHS, DerivedOp > const & derived () const
 Derived datatype.
 
Scalar const operator[] (const index_t i) const
 Vector indexing in the expression.
 
Scalar const operator() (const index_t r, const index_t c) const
 Matrix indexing.
 
Vector const vector_op (const index_t i) const
 Vector operation at given index.
 
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index with loop predicate.
 
Vector const matrix_op (const index_t r, const index_t c) const
 Matrix operation at index.
 
Vector const matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const
 Matrix operation at index with tail predication.
 
vector_length_t length () const
 Length of result.
 
vector_length_t rows () const
 Number of rows for result.
 
vector_length_t columns () const
 Number of columns for result.
 

◆ _UnaryOperator

struct _UnaryOperator
template<typename Scalar, typename Derived>
struct _UnaryOperator< Scalar, Derived >

Unary operator.

Template Parameters
ScalarDatatype for scalar
DerivedDatatype representing the operator expression

◆ _BinaryOperator

struct _BinaryOperator
template<typename ScalarLHS, typename ScalarRHS, typename Derived>
struct _BinaryOperator< ScalarLHS, ScalarRHS, Derived >

Unary operator.

Template Parameters
ScalarDatatype for scalar
DerivedDatatype representing the operator expression

◆ _AddOp

struct _AddOp
template<typename ScalarLHS, typename ScalarRHS>
struct _AddOp< ScalarLHS, ScalarRHS >

Add operator.

Template Parameters
ScalarDatatype for scalar

◆ _SubOp

struct _SubOp
template<typename ScalarLHS, typename ScalarRHS>
struct _SubOp< ScalarLHS, ScalarRHS >

Sub operator.

Template Parameters
ScalarDatatype for scalar

◆ _MulOp

struct _MulOp
template<typename ScalarLHS, typename ScalarRHS>
struct _MulOp< ScalarLHS, ScalarRHS >

Mul operator.

Template Parameters
ScalarDatatype for scalar

◆ _NegOp

struct _NegOp
template<typename Scalar>
struct _NegOp< Scalar >

Neg operator.

Template Parameters
ScalarDatatype for scalar

◆ _NoOp

struct _NoOp
template<typename Scalar>
struct _NoOp< Scalar >

No operator.

Template Parameters
ScalarDatatype for scalar

◆ _ConjugateOp

struct _ConjugateOp
template<typename Scalar>
struct _ConjugateOp< Scalar >

Conjugate operator.

Template Parameters
ScalarDatatype for scalar

Function Documentation

◆ dot()

DotResult< DotFieldResult< VA, VB > > dot ( const VA &  a,
const VB &  b 
)
inline

Dot product.

Template Parameters
VALeft hand side vector datatype
VBRight hand side vector datatype
Parameters
aleft hand side vector
bright hand side vector
Returns
The dot product

The vector can be vector, vector views or expressions.

◆ has_predicate()

constexpr bool has_predicate ( )
constexpr

Check if predicated instructions are supported.

Template Parameters
DAThe datatype
Returns
True if predicated instructions are supported

◆ has_predicate_inst()

constexpr bool has_predicate_inst ( )
constexpr

Determines if datatype has predicated loop for current architecture.

Template Parameters
DADatatype
Returns
True if has predicated loops

◆ has_vector_inst()

constexpr bool has_vector_inst ( )
constexpr

Determines if vector datatype supports vector instruction on a current architecture.

Template Parameters
DADatatype
Returns
True if has vector instructions

◆ is_complex()

constexpr bool is_complex ( )
constexpr

Check if vector / matrix contains complex numbers.

Template Parameters
ADatatype
Returns
True if complex, False otherwise.

◆ is_fixed()

constexpr bool is_fixed ( )
constexpr

Determines if datatype is fixed (Q31,Q15, complex<Q15> ...).

Template Parameters
AThe datatype
Returns
True if fixed, False otherwise.

◆ is_float()

constexpr bool is_float ( )
constexpr

Determines if datatype is a float (double, float, complex ...).

Template Parameters
ADatatype
Returns
True if float, False otherwise.

◆ is_mixed()

constexpr bool is_mixed ( )
constexpr

Check if expression contains a mix of complex / real operations.

Template Parameters
DAExpression datatype
Returns
True if mixed, False otherwise.

◆ is_only_vector()

constexpr bool is_only_vector ( )
constexpr

Check if has vector indexing.

Template Parameters
DADatatype
Returns
True if dtatype supports vector indexing

◆ is_scalar()

constexpr bool is_scalar ( )
constexpr

Determines if scalar datatype (not vector, vectorview, matrix, matrixview)

Template Parameters
DA{ description }
Returns
True if scalar, False otherwise.

◆ must_use_matrix_idx()

constexpr bool must_use_matrix_idx ( )
constexpr

Check if datatype can only be used as a matrix (no vector addressing)

Template Parameters
DADatatype
Returns
True if can only be used as a matrix (no vector indexing)

◆ must_use_matrix_idx_pair()

constexpr bool must_use_matrix_idx_pair ( )
constexpr

Check if datatypes have same scalar datatype and no vector indexing.

Template Parameters
DAFirst datatype
DBSecond datatype
Returns
True if datatypes have same scalar datatype and no vector indexing

◆ same_nb_lanes()

constexpr bool same_nb_lanes ( )
constexpr

Check same number of lanes is used.

Template Parameters
ADatatype
BDatatype
Returns
True is same number of lanes for A and B

◆ same_static_length()

constexpr bool same_static_length ( )
constexpr

Check compatibility of length.

Template Parameters
DAFirst datatype
DBSecond datatype
Returns
False only when DA and DA have different static lengths. All other cases are True.

◆ static_length()

constexpr vector_length_t static_length ( )
constexpr

Static length.

Template Parameters
DAFirst datatype
DBSecond datatype
Returns
Return the static length of the first datatype having a static length in the pair.

◆ swap()

void swap ( VA &&  a,
VB &&  b 
)
inline

Swap vectors.

Template Parameters
VALeft hand side vector datatype
VBRight hand side vector datatype
Parameters
aleft hand side vector
bright hand side vector

The vector can be vector, vector views or expressions.

The content of vector is swapped.

◆ vector_idx_pair()

constexpr bool vector_idx_pair ( )
constexpr

Check if both datatype have vector indexing and are same scalar datatype.

Template Parameters
DAFirst datatype
DBSecond datatype
Returns
True if both datatype have vector indexing and same scalar type