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

Data Structures

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< Scalar, Derived >
 Unary operator. More...
 
struct  _AddOp< Scalar >
 Add operator. More...
 
struct  _SubOp< Scalar >
 Sub operator. More...
 
struct  _MulOp< Scalar >
 Mul operator. More...
 
struct  _NegOp< Scalar >
 Neg operator. More...
 
struct  _NoOp< Scalar >
 No 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_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 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< VA > 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::_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 Scalar, typename Derived>
struct _BinaryOperator< Scalar, Derived >

Unary operator.

Template Parameters
ScalarDatatype for scalar
DerivedDatatype representing the operator expression

◆ _AddOp

struct _AddOp
template<typename Scalar>
struct _AddOp< Scalar >

Add operator.

Template Parameters
ScalarDatatype for scalar

◆ _SubOp

struct _SubOp
template<typename Scalar>
struct _SubOp< Scalar >

Sub operator.

Template Parameters
ScalarDatatype for scalar

◆ _MulOp

struct _MulOp
template<typename Scalar>
struct _MulOp< Scalar >

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

Function Documentation

◆ dot()

DotResult< VA > 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_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_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_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 are same scalar datatype.

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