CMSIS-DSP  
CMSIS DSP Software Library
 
Loading...
Searching...
No Matches

Content

 Generic Types
 
 Architecture specific algorithm
 

Files

file  basic.hpp
 
file  basic.hpp
 
file  basic.hpp
 
file  arch.hpp
 
file  number.hpp
 
file  fixed_point.hpp
 
file  memory.hpp
 

Namespaces

namespace  arm_cmsis_dsp::arm_cmsis_dsp::inner
 

Data Structures

struct  fixed_storage_type< M, F, s, bool >
 Storage type for a fixed point number. More...
 
struct  fixed_storage_type< M, F, true, test64(M, F, 1)>
 Storage type for a fixed point number representable on int64. More...
 
struct  fixed_storage_type< M, F, false, test64(M, F, 0)>
 Storage type for a fixed point number representable on uint64. More...
 
struct  fixed_storage_type< M, F, true, test32(M, F, 1)>
 Storage type for a fixed point number representable on int32. More...
 
struct  fixed_storage_type< M, F, false, test32(M, F, 0)>
 Storage type for a fixed point number representable on uint32. More...
 
struct  fixed_storage_type< M, F, true, test16(M, F, 1)>
 Storage type for a fixed point number representable on int16. More...
 
struct  fixed_storage_type< M, F, false, test16(M, F, 0)>
 Storage type for a fixed point number representable on uint16. More...
 
struct  fixed_storage_type< M, F, true, test8(M, F, 1)>
 Storage type for a fixed point number representable on int8. More...
 
struct  fixed_storage_type< M, F, false, test8(M, F, 0)>
 Storage type for a fixed point number representable on uint8. More...
 
struct  Q< M, F, true, int64_t >
 Signed fixed point datatypes on 64 bits. More...
 
struct  Q< M, F, false, uint64_t >
 Unsigned fixed point datatypes on 64 bits. More...
 
struct  Q< M, F, true, int32_t >
 Signed fixed point datatypes on 32 bits. More...
 
struct  Q< M, F, false, uint32_t >
 Unsigned fixed point datatypes on 32 bits. More...
 
struct  Q< M, F, true, int16_t >
 Signed fixed point datatypes on 16 bits. More...
 
struct  Q< M, F, false, uint16_t >
 Unsigned fixed point datatypes on 16 bits. More...
 
struct  Q< M, F, true, int8_t >
 Signed fixed point datatypes on 8 bits. More...
 
struct  Q< M, F, false, uint8_t >
 Unsigned fixed point datatypes on 8 bits. More...
 
struct  FixedCastShift< M, FD, FS, S,(FD >FS)>
 Changed fractional representation of a fixed point number using a shift. More...
 
struct  FixedCastShift< M, FD, FS, S,(FD< FS)>
 Changed fractional representation of a fixed point number using a shift. More...
 
struct  Accumulate< MD, MS, F, S, true >
 Accumulation without saturation. More...
 
struct  vector_traits< T, arch, typename >
 Properties of a vector datatype linked to a scalar datatype. More...
 
struct  vctpq< T, typename >
 Predicate (only defined for vector architectures) More...
 
struct  number_traits< std::complex< double > >
 Features for complex double. More...
 
struct  vector_traits< std::complex< double >, arch, void >
 Default vector datatype description for this scalar datatype. More...
 
struct  number_traits< double >
 Features for double. More...
 
struct  vector_traits< double, arch, void >
 Default vector datatype description for this scalar datatype. More...
 
struct  number_traits< std::complex< float > >
 Features for complex float. More...
 
struct  vector_traits< std::complex< float >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
 Vector instructions for complex float when no Helium or Neon. More...
 
struct  number_traits< float >
 Features for float. More...
 
struct  vector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
 Vector instructions for float when no Helium or Neon. More...
 
struct  number_traits< std::complex< float16_t > >
 Feature for complex float16. More...
 
struct  vector_traits< std::complex< float16_t >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
 float16 vector description when no vector architecture More...
 
struct  number_traits< float16_t >
 Feature of float16 datatype. More...
 
struct  number_traits< Q31 >
 Features for Q31. More...
 
struct  vector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
 Vector features for Q31 when no vector instructions. More...
 
struct  number_traits< std::complex< Q31 > >
 Features for complex Q31. More...
 
struct  vector_traits< std::complex< Q31 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
 Vector features for std::complex<Q31> when no vector instructions. More...
 
struct  number_traits< Q15 >
 Q15 features. More...
 
struct  vector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >
 Vector features for Q15 when no vector architecture. More...
 
struct  number_traits< std::complex< Q15 > >
 Features for complex Q15. More...
 
struct  vector_traits< std::complex< Q15 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
 Vector features for Q15 when no vector architecture. More...
 
struct  number_traits< Q7 >
 Q7 features. More...
 
struct  vector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >
 Vector description when no vector architecture. More...
 
struct  number_traits< std::complex< Q7 > >
 Features for Complex Q7. More...
 
struct  vector_traits< std::complex< Q7 >, arch, void >
 Vector description when no vector architecture. More...
 
struct  Q15DSPVector
 Representation of a vector when DSP extension supported. More...
 
struct  vector_traits< Q15, DSP, typename std::enable_if< true >::type >
 Vector description for Q15 with DSP extensions. More...
 
struct  vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
 Vector datatype for Helium. More...
 
struct  vctpq< float >
 vctpq for this datatype More...
 
struct  vload1_gen_stride< float32_t, 0, 1, 2, 3 >
 Load with generalized stride specialized for <0,1,2,3> More...
 
struct  vload1_gen_stride_z< float32_t, 0, 1, 2, 3 >
 Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3> More...
 
struct  vstore1_gen_stride< float32_t, 0, 1, 2, 3 >
 Generalized store with stride (Specialized for <0,1,2,3>) More...
 
struct  vstore1_gen_stride_z< float32_t, 0, 1, 2, 3 >
 Scatter store with tail predicate (specialized for <0,1,2,3>) More...
 
struct  vector_traits< std::complex< float >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
 Vector datatype for Helium. More...
 
struct  vload1_gen_stride< std::complex< float >, 0, 1, 2, 3 >
 Load with generalized stride specialized for <0,1,2,3> More...
 
struct  vstore1_gen_stride< std::complex< float32_t >, 0, 1, 2, 3 >
 Generalized store with stride (Specialized for <0,1,2,3>) More...
 
struct  vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
 Vector features for f16 on Helium. More...
 
struct  vctpq< float16_t >
 vctpq for Helium and f16 More...
 
struct  vector_traits< std::complex< float16_t >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
 Vector datatype for Helium. More...
 
struct  vload1_gen_stride< std::complex< float16_t >, 0, 1, 2, 3, 4, 5, 6, 7 >
 Load with generalized stride specialized for <0,1,2,3,4,5,6,7> More...
 
struct  vstore1_gen_stride< std::complex< float16_t >, 0, 1, 2, 3, 4, 5, 6, 7 >
 Generalized store with stride (Specialized for <0,1,2,3>) More...
 
struct  vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
 Vector features for Q15 on Helium. More...
 
struct  number_traits< std::tuple< E... > >
 Number description for a tuple of numbers. More...
 
struct  vector_traits< std::tuple< E... >, arch >
 Tuple of compatible vectors. More...
 
struct  vctpq< std::tuple< E... > >
 Tuple of predicates. More...
 
struct  Vector_Base< P >
 Storage for a vector. More...
 
struct  Vector< P, L, Allocator >
 Vector template for size knonw at build time. More...
 
struct  Vector< P, DYNAMIC, Allocator >
 Vector template for dynamic vector (size known at runtime) More...
 
struct  VectorView< T, stride >
 Vector view. More...
 
struct  VectorView< T, DYNAMIC >
 Vector view with dynamic stride (not known at build time) More...
 

Macros

#define F16INFINITY   ((float16_t)__builtin_inf())
 16-bit floating-point type definition. This is already defined in arm_mve.h
 
#define F64_MAX   ((float64_t)DBL_MAX)
 
#define ARM_MATH_TYPES_F16_H
 
#define F16INFINITY   ((float16_t)__builtin_inf())
 16-bit floating-point type definition. This is already defined in arm_mve.h
 

Functions

template<typename LHS, typename RHS, typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&compatible_element< LHS, RHS >() &&same_static_length< LHS, RHS >(), bool >::type = true>
auto operator+ (const LHS &a, const RHS &b)
 Addition operator for expressions.
 
template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto operator+ (const LHS &a)
 
  • operator for expressions

 
template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto expr (const LHS &a)
 Identity operator for expression.
 
template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto copy (const LHS &a)
 Identity operator for expression.
 
template<typename LHS, typename RHS, typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&compatible_element< LHS, RHS >() &&same_static_length< LHS, RHS >(), bool >::type = true>
auto operator- (const LHS &a, const RHS &b)
 Subtraction operator for expressions.
 
template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto operator- (const LHS &a)
 
  • operator for expressions

 
template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto conjugate (const LHS &a)
 
  • operator for expressions

 
template<typename LHS, typename RHS, typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&compatible_element< LHS, RHS >() &&same_static_length< LHS, RHS >(), bool >::type = true>
auto operator* (const LHS &a, const RHS &b)
 Element wise multiplication operator for expressions.
 

Description


Data Structure Documentation

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type
template<int M, int F, bool s = true, bool = true>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, s, bool >

Storage type for a fixed point number.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part
ssigned or unsigned

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test64(M, F, 1)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test64(M, F, 1)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test64(M, F, 1)>

Storage type for a fixed point number representable on int64.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef int64_t value_type
 Storage for the fixed point number.
 
typedef int64_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef int32_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test64(M, F, 0)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test64(M, F, 0)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test64(M, F, 0)>

Storage type for a fixed point number representable on uint64.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef uint64_t value_type
 Storage for the fixed point number.
 
typedef uint64_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef uint32_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test32(M, F, 1)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test32(M, F, 1)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test32(M, F, 1)>

Storage type for a fixed point number representable on int32.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef int32_t value_type
 Storage for the fixed point number.
 
typedef int64_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef int16_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test32(M, F, 0)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test32(M, F, 0)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test32(M, F, 0)>

Storage type for a fixed point number representable on uint32.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef uint32_t value_type
 Storage for the fixed point number.
 
typedef uint64_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef uint16_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test16(M, F, 1)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test16(M, F, 1)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test16(M, F, 1)>

Storage type for a fixed point number representable on int16.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef int16_t value_type
 Storage for the fixed point number.
 
typedef int32_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef int8_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test16(M, F, 0)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test16(M, F, 0)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test16(M, F, 0)>

Storage type for a fixed point number representable on uint16.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef uint16_t value_type
 Storage for the fixed point number.
 
typedef uint32_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef uint8_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test8(M, F, 1)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test8(M, F, 1)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, true, test8(M, F, 1)>

Storage type for a fixed point number representable on int8.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef int8_t value_type
 Storage for the fixed point number.
 
typedef int16_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef int8_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test8(M, F, 0)>

struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test8(M, F, 0)>
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::fixed_storage_type< M, F, false, test8(M, F, 0)>

Storage type for a fixed point number representable on uint8.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

typedef uint8_t value_type
 Storage for the fixed point number.
 
typedef uint16_t wider_type
 Storage for the widening of this fixed point number datatype.
 
typedef uint8_t narrow_type
 Storage for the narrowing of this fixed point number datatype.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int64_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int64_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int64_t >

Signed fixed point datatypes on 64 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,true>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,true>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
constexpr Q (const Q< M, F, false > &other)
 Convert an unsigned fixed point to this fixed point.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 
Qoperator+= (const Q other)
 this += other
 
Qoperator-= (const Q other)
 this -= other
 

Static Public Member Functions

static constexpr value_type convert (const float f)
 Convert a float to fixed point.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = true
 Is this number representation signed.
 
static constexpr value_type maxVal = 0x7FFFFFFFFFFFFFFFLL
 Maximum representable positive value.
 
static constexpr value_type minVal = 0x8000000000000000LL
 Minimum representable negative value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint64_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint64_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint64_t >

Unsigned fixed point datatypes on 64 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,false>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,false>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 

Static Public Member Functions

static constexpr value_type convert (const float f)
 Convert a float to fixed point.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = false
 Is this number representation signed.
 
static constexpr value_type maxVal = 0xFFFFFFFFFFFFFFFFLL
 Maximum representable positive value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int32_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int32_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int32_t >

Signed fixed point datatypes on 32 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,true>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,true>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
constexpr Q (const Q< M, F, false > &other)
 Convert an unsigned fixed point to this fixed point.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 
Qoperator+= (const Q other)
 this += other
 
Qoperator-= (const Q other)
 this -= other
 

Static Public Member Functions

static constexpr value_type sat (const wider_type i)
 Saturate a wider type to the current type.
 
static constexpr value_type convert (const float f)
 Convert a float to fixed point with saturation.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = true
 Is this number representation signed.
 
static constexpr value_type maxVal = 0x7FFFFFFFL
 Maximum representable positive value.
 
static constexpr value_type minVal = 0x80000000L
 Minimum representable negative value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint32_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint32_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint32_t >

Unsigned fixed point datatypes on 32 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,false>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,false>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 

Static Public Member Functions

static constexpr value_type sat (const wider_type i)
 Saturate a wider type to the current type.
 
static constexpr value_type convert (const float f)
 Convert a float to fixed point with saturation.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = false
 Is this number representation signed.
 
static constexpr value_type maxVal = 0xFFFFFFFFL
 Maximum representable positive value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int16_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int16_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int16_t >

Signed fixed point datatypes on 16 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,true>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,true>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
constexpr Q (const Q< M, F, false > &other)
 Convert an unsigned fixed point to this fixed point.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 
Qoperator+= (const Q other)
 this += other
 
Qoperator-= (const Q other)
 this -= other
 

Static Public Member Functions

static constexpr value_type sat (const wider_type i)
 Saturate a wider type to the current type.
 
static constexpr value_type convert (const float f)
 Convert a float to fixed point with saturation.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = true
 Is this number representation signed.
 
static constexpr value_type maxVal = 0x7FFF
 Maximum representable positive value.
 
static constexpr value_type minVal = 0x8000
 Minimum representable negative value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint16_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint16_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint16_t >

Unsigned fixed point datatypes on 16 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,false>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,false>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 
Qoperator+= (const Q other)
 this += other
 

Static Public Member Functions

static constexpr value_type sat (const wider_type i)
 Saturate a wider type to the current type.
 
static constexpr value_type convert (const float f)
 Convert a float to fixed point with saturation.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = false
 Is this number representation signed.
 
static constexpr value_type maxVal = 0xFFFF
 Maximum representable positive value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int8_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int8_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, true, int8_t >

Signed fixed point datatypes on 8 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,true>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,true>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
constexpr Q (const Q< M, F, false > &other)
 Convert an unsigned fixed point to this fixed point.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 
Qoperator+= (const Q other)
 this += other
 
Qoperator-= (const Q other)
 this -= other
 

Static Public Member Functions

static constexpr value_type sat (const wider_type i)
 Saturate a wider type to the current type.
 
static constexpr value_type convert (const float f)
 Convert a float to fixed point with saturation.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = true
 Is this number representation signed.
 
static constexpr value_type maxVal = 0x7F
 Maximum representable positive value.
 
static constexpr value_type minVal = 0x80
 Minimum representable negative value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint8_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint8_t >
template<int M, int F>
struct arm_cmsis_dsp::arm_cmsis_dsp::Q< M, F, false, uint8_t >

Unsigned fixed point datatypes on 8 bits.

Template Parameters
MNumber of bits for mantissa (without sign bit)
FNumber of bits for fractional part

Public Types

using value_type = typename fixed_storage_type<M,F,false>::value_type
 Storage type for the value.
 
using wider_type = typename fixed_storage_type<M,F,false>::wider_type
 Storage type for the widening of the value.
 

Public Member Functions

constexpr Q ()
 Create a new zero fixed point.
 
constexpr Q (const value_type x)
 Create a new fixed point from a raw integer.
 
bool operator== (const Q &b) const
 this == b
 
bool operator!= (const Q &b) const
 this != b
 
bool operator< (const Q &b) const
 this < b
 
bool operator> (const Q &b) const
 this > b
 
bool operator<= (const Q &b) const
 this <= b
 
bool operator>= (const Q &b) const
 this >= b
 
Qoperator+= (const Q other)
 this += other
 

Static Public Member Functions

static constexpr value_type sat (const wider_type i)
 Saturate a wider type to the current type.
 
static constexpr value_type convert (const float f)
 Convert a float to fixed point with saturation.
 
static constexpr Q f (const float x)
 Create a new fixed point from a float.
 
static constexpr Q one ()
 Fixed point number representing 1.
 

Data Fields

value_type v
 Storage value.
 

Static Public Attributes

static constexpr int fracBits = F
 Number of fractional bits.
 
static constexpr int mantissaBits = M
 Number of mantissa bits (without sign bit)
 
static constexpr bool isSigned = false
 Is this number representation signed.
 
static constexpr value_type maxVal = 0xFF
 Maximum representable positive value.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD >FS)>

struct arm_cmsis_dsp::arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD >FS)>
template<int M, int FD, int FS, bool S>
struct arm_cmsis_dsp::arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD >FS)>

Changed fractional representation of a fixed point number using a shift.

Template Parameters
MNumber of mantissa bits for the fixed point number
FDNumber of fractional bits for the destination fixed point number
FSNumber of fractional bits for the source fixed point number
SIs the fixed point number using a signed representation
Parameters
srcThe fixed point number
Returns
return the fixed point number with different fractional part format

Only applies if FD > FS

◆ arm_cmsis_dsp::arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD< FS)>

struct arm_cmsis_dsp::arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD< FS)>
template<int M, int FD, int FS, bool S>
struct arm_cmsis_dsp::arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD< FS)>

Changed fractional representation of a fixed point number using a shift.

Template Parameters
MNumber of mantissa bits for the fixed point number
FDNumber of fractional bits for the destination fixed point number
FSNumber of fractional bits for the source fixed point number
SIs the fixed point number using a signed representation
Parameters
srcThe fixed point number
Returns
return the fixed point number with different fractional part format

Only applies if FD < FS

◆ arm_cmsis_dsp::arm_cmsis_dsp::Accumulate< MD, MS, F, S, true >

struct arm_cmsis_dsp::arm_cmsis_dsp::Accumulate< MD, MS, F, S, true >
template<int MD, int MS, int F, bool S>
struct arm_cmsis_dsp::arm_cmsis_dsp::Accumulate< MD, MS, F, S, true >

Accumulation without saturation.

Template Parameters
MDNumber of mantissa bits for the destination fixed point number
MSNumber of mantissa bits for the source fixed point number
FNumber of fractional bits for fixed point number
SIs the fixed point number using a signed representation

Static Public Member Functions

static Q< MD, F, S > acc (const Q< MD, F, S > &a, const Q< MS, F, S > &b)
 Accumulation without saturation.
 

Member Function Documentation

◆ acc()

template<int MD, int MS, int F, bool S>
static Q< MD, F, S > acc ( const Q< MD, F, S > & a,
const Q< MS, F, S > & b )
inlinestatic

Accumulation without saturation.

Parameters
[in]afirst fixed point number
[in]bsecond fixed point number
Returns
The sum of both fixed point number with more matissa bits.

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits
template<typename T, typename arch = Scalar, typename = void>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< T, arch, typename >

Properties of a vector datatype linked to a scalar datatype.

Template Parameters
TType of the scalar
archArchitecture. It is defined by the architecture selection code and should never be set by the user.

Public Types

typedef T type
 Scalar datatype.
 
typedef T storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 True if scalar type has a related vector type.
 
static constexpr bool is_float = false
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed = false
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq
template<typename T, typename = void>
struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< T, typename >

Predicate (only defined for vector architectures)

Template Parameters
Tscalar data type
Parameters
vNumber of loops
Returns
Predicate for the given architecture

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< double > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< double > >

Features for complex double.

Public Types

typedef std::complex< double > accumulator
 Accumulator datatype for this scalar datatype.
 
typedef std::complex< double > compute_type
 Compute datatype for this scalar datatype.
 

Static Public Member Functions

static constexpr std::complex< double > one ()
 One for this datatype.
 

Static Public Attributes

static constexpr bool is_float = true
 It is a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point.
 

Member Function Documentation

◆ one()

static constexpr std::complex< double > one ( )
inlinestaticconstexpr

One for this datatype.

Returns
Return 1 representation for this datatype

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< double >, arch, void >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< double >, arch, void >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< double >, arch, void >

Default vector datatype description for this scalar datatype.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< double > type
 
typedef std::complex< double > storage_type
 
typedef bool vector
 
typedef bool temp_accumulator
 
typedef uint32_t predicate_t
 
typedef std::complex< double > type
 Scalar datatype.
 
typedef std::complex< double > storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 
static constexpr bool is_float = true
 It is a float.
 
static constexpr bool is_fixed = false
 Not a fixed point.
 
static constexpr bool has_predicate = false
 No predicated loops.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Typedef Documentation

◆ predicate_t

template<typename arch>
typedef uint32_t predicate_t

Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed

◆ storage_type

template<typename arch>
typedef std::complex<double> storage_type

Storage datatype

◆ temp_accumulator

template<typename arch>
typedef bool temp_accumulator

Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed

◆ type

template<typename arch>
typedef std::complex<double> type

Scalar datatype

◆ vector

template<typename arch>
typedef bool vector

Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed

Field Documentation

◆ has_vector

template<typename arch>
bool has_vector = false
staticconstexpr

By default : no vector architecture assumed

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< double >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< double >

Features for double.

Public Types

typedef double accumulator
 Accumulator datatype for this scalar datatype.
 
typedef double compute_type
 Compute datatype for this scalar datatype.
 
typedef double display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr double one ()
 One for this datatype.
 

Static Public Attributes

static constexpr bool is_float = true
 It is a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point.
 

Member Function Documentation

◆ one()

static constexpr double one ( )
inlinestaticconstexpr

One for this datatype.

Returns
Return 1 representation for this datatype

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< double, arch, void >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< double, arch, void >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< double, arch, void >

Default vector datatype description for this scalar datatype.

Template Parameters
archCurrent architecture

Public Types

typedef double type
 
typedef double storage_type
 
typedef bool vector
 
typedef bool temp_accumulator
 
typedef uint32_t predicate_t
 
typedef double type
 Scalar datatype.
 
typedef double storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 
static constexpr bool is_float = true
 It is a float.
 
static constexpr bool is_fixed = false
 Not a fixed point.
 
static constexpr bool has_predicate = false
 No predicated loops.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Typedef Documentation

◆ predicate_t

template<typename arch>
typedef uint32_t predicate_t

Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed

◆ storage_type

template<typename arch>
typedef double storage_type

Storage datatype

◆ temp_accumulator

template<typename arch>
typedef bool temp_accumulator

Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed

◆ type

template<typename arch>
typedef double type

Scalar datatype

◆ vector

template<typename arch>
typedef bool vector

Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed

Field Documentation

◆ has_vector

template<typename arch>
bool has_vector = false
staticconstexpr

By default : no vector architecture assumed

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< float > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< float > >

Features for complex float.

Public Types

typedef std::complex< float > accumulator
 Accumulator datatype for this scalar datatype.
 
typedef std::complex< float > compute_type
 Compute datatype for this scalar datatype.
 
typedef std::complex< float > display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr std::complex< float > one ()
 One for this datatype.
 

Static Public Attributes

static constexpr bool is_float = true
 It is a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point.
 

Member Function Documentation

◆ one()

static constexpr std::complex< float > one ( )
inlinestaticconstexpr

One for this datatype.

Returns
Return 1 representation for this datatype

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

Vector instructions for complex float when no Helium or Neon.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< float > type
 Current type.
 
typedef std::complex< float > storage_type
 Current storage type.
 
typedef bool vector
 Dummy type. Not used when no vector instructions.
 
typedef bool temp_accumulator
 Dummy type. Not used when no vector instructions.
 
typedef uint32_t predicate_t
 Dummy type. Not used when no vector instructions.
 
typedef std::complex< float > type
 Scalar datatype.
 
typedef std::complex< float > storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instructions for this datatype.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Is fixed.
 
static constexpr bool has_predicate = false
 No predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< float >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< float >

Features for float.

Public Types

typedef float accumulator
 Accumulator datatype for this scalar datatype.
 
typedef float compute_type
 Compute datatype for this scalar datatype.
 
typedef float display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr float one ()
 One for this datatype.
 

Static Public Attributes

static constexpr bool is_float = true
 It is a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point.
 

Member Function Documentation

◆ one()

static constexpr float one ( )
inlinestaticconstexpr

One for this datatype.

Returns
Return 1 representation for this datatype

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

Vector instructions for float when no Helium or Neon.

Template Parameters
archCurrent architecture

Public Types

typedef float type
 Current type.
 
typedef float storage_type
 Current storage type.
 
typedef bool vector
 Dummy type. Not used when no vector instructions.
 
typedef bool temp_accumulator
 Dummy type. Not used when no vector instructions.
 
typedef uint32_t predicate_t
 Dummy type. Not used when no vector instructions.
 
typedef float type
 Scalar datatype.
 
typedef float storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instructions for this datatype.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Is fixed.
 
static constexpr bool has_predicate = false
 No predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< float16_t > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< float16_t > >

Feature for complex float16.

Public Types

typedef std::complex< float16_t > accumulator
 Accumulator datatype.
 
typedef std::complex< float16_t > compute_type
 Compute datatype (Less efficient than _Float16 but some C++ std lib is causing issues with _Float16)
 
typedef std::complex< float16_t > display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr std::complex< float16_t > one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = true
 It is a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point number.
 

Member Function Documentation

◆ one()

static constexpr std::complex< float16_t > one ( )
inlinestaticconstexpr

One value.

Returns
One value in f16

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float16_t >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float16_t >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float16_t >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

float16 vector description when no vector architecture

Public Types

typedef std::complex< float16_t > type
 Float16 datatype.
 
typedef std::complex< float16_t > storage_type
 Float16 storage type.
 
typedef bool vector
 Dummy type when no vector instruction is supported.
 
typedef bool temp_accumulator
 Dummy type when no vector instruction is supported.
 
typedef uint32_t predicate_t
 Dummy type when no vector instruction is supported.
 
typedef std::complex< float16_t > type
 Scalar datatype.
 
typedef std::complex< float16_t > storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instruction.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Not fixed point.
 
static constexpr bool has_predicate = false
 Has predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< float16_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< float16_t >

Feature of float16 datatype.

Public Types

typedef float16_t accumulator
 Accumulator datatype.
 
typedef _Float16 compute_type
 Compute datatype.
 
typedef float display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr float16_t one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = true
 It is a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point number.
 

Member Function Documentation

◆ one()

static constexpr float16_t one ( )
inlinestaticconstexpr

One value.

Returns
One value in f16

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< Q31 >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< Q31 >

Features for Q31.

Public Types

typedef Q< 15, 48 > accumulator
 Accumulator datatype.
 
typedef Q31 compute_type
 Compute type.
 
typedef Q31 display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr Q31 one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = false
 Is not a float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 

Member Function Documentation

◆ one()

static constexpr Q31 one ( )
inlinestaticconstexpr

One value.

Returns
One value

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

Vector features for Q31 when no vector instructions.

Template Parameters
archCurrent architecture

Public Types

typedef Q31 type
 Datatype.
 
typedef type::value_type storage_type
 Storage tpe (int32_t)
 
typedef bool vector
 Dummy type when no vector instructions are supported.
 
typedef bool temp_accumulator
 Dummy type when no vector instructions are supported.
 
typedef uint32_t predicate_t
 Dummy type when no vector instructions are supported.
 
typedef Q31 type
 Scalar datatype.
 
typedef Q31 storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instruction.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed.
 
static constexpr bool has_predicate = false
 No predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< Q31 > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< Q31 > >

Features for complex Q31.

Public Types

typedef std::complex< Q< 15, 48 > > accumulator
 Accumulator datatype.
 
typedef std::complex< Q31compute_type
 Compute type.
 
typedef std::complex< Q31display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr std::complex< Q31one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = false
 Is not a float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 

Member Function Documentation

◆ one()

static constexpr std::complex< Q31 > one ( )
inlinestaticconstexpr

One value.

Returns
One value

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q31 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q31 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q31 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

Vector features for std::complex<Q31> when no vector instructions.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< Q31type
 Datatype.
 
typedef type::value_type storage_type
 Storage tpe (int32_t)
 
typedef bool vector
 Dummy type when no vector instructions are supported.
 
typedef bool temp_accumulator
 Dummy type when no vector instructions are supported.
 
typedef uint32_t predicate_t
 Dummy type when no vector instructions are supported.
 
typedef std::complex< Q31type
 Scalar datatype.
 
typedef std::complex< Q31storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instruction.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed.
 
static constexpr bool has_predicate = false
 No predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< Q15 >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< Q15 >

Q15 features.

Public Types

typedef Q< 33, 30 > accumulator
 Accumulator datatype.
 
typedef Q15 compute_type
 Compute type.
 
typedef Q15 display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr Q15 one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 

Member Function Documentation

◆ one()

static constexpr Q15 one ( )
inlinestaticconstexpr

One value.

Returns
One value in Q15

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >

Vector features for Q15 when no vector architecture.

Template Parameters
archCurrent architecture

Public Types

typedef Q15 type
 Compute type.
 
typedef type::value_type storage_type
 Storage datatype (int16_t)
 
typedef bool vector
 Dummy type when no vector instructions.
 
typedef bool temp_accumulator
 Dummy type when no vector instructions.
 
typedef uint32_t predicate_t
 Dummy type when no vector instructions.
 
typedef Q15 type
 Scalar datatype.
 
typedef Q15 storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 Has no vector instructions.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 
static constexpr bool has_predicate = false
 Has no predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< Q15 > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< Q15 > >

Features for complex Q15.

Public Types

typedef std::complex< Q< 33, 30 > > accumulator
 Accumulator datatype.
 
typedef std::complex< Q15compute_type
 Compute type.
 
typedef std::complex< Q15display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr std::complex< Q15one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 

Member Function Documentation

◆ one()

static constexpr std::complex< Q15 > one ( )
inlinestaticconstexpr

One value.

Returns
One value in std::complex<Q15>

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q15 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q15 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q15 >, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type >

Vector features for Q15 when no vector architecture.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< Q15type
 Compute type.
 
typedef type::value_type storage_type
 Storage datatype (int16_t)
 
typedef bool vector
 Dummy type when no vector instructions.
 
typedef bool temp_accumulator
 Dummy type when no vector instructions.
 
typedef uint32_t predicate_t
 Dummy type when no vector instructions.
 
typedef std::complex< Q15type
 Scalar datatype.
 
typedef std::complex< Q15storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 Has no vector instructions.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 
static constexpr bool has_predicate = false
 Has no predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< Q7 >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< Q7 >

Q7 features.

Public Types

typedef Q< 17, 14 > accumulator
 Accumulator datatype.
 
typedef Q7 compute_type
 Compute type.
 
typedef Q7 display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr Q7 one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 

Member Function Documentation

◆ one()

static constexpr Q7 one ( )
inlinestaticconstexpr

One value.

Returns
One value in Q7

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type >

Vector description when no vector architecture.

Template Parameters
archCurrent architecture

Public Types

typedef Q7 type
 Current datatype.
 
typedef type::value_type storage_type
 Storage datatype (int8_t)
 
typedef bool vector
 Dummy datatype when no vector instructions.
 
typedef bool temp_accumulator
 Dummy datatype when no vector instructions.
 
typedef uint32_t predicate_t
 Dummy datatype when no vector instructions.
 
typedef Q7 type
 Scalar datatype.
 
typedef Q7 storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instructions.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 
static constexpr bool has_predicate = false
 No predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< Q7 > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::complex< Q7 > >

Features for Complex Q7.

Public Types

typedef std::complex< Q< 17, 14 > > accumulator
 Accumulator datatype.
 
typedef std::complex< Q7compute_type
 Compute type.
 
typedef std::complex< Q7display_type
 Display type for printf.
 

Static Public Member Functions

static constexpr std::complex< Q7one ()
 One value.
 

Static Public Attributes

static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 

Member Function Documentation

◆ one()

static constexpr std::complex< Q7 > one ( )
inlinestaticconstexpr

One value.

Returns
One value in std::complex<Q7>

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q7 >, arch, void >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q7 >, arch, void >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< Q7 >, arch, void >

Vector description when no vector architecture.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< Q7type
 Current datatype.
 
typedef type::value_type storage_type
 Storage datatype (int8_t)
 
typedef bool vector
 Dummy datatype when no vector instructions.
 
typedef bool temp_accumulator
 Dummy datatype when no vector instructions.
 
typedef uint32_t predicate_t
 Dummy datatype when no vector instructions.
 
typedef std::complex< Q7type
 Scalar datatype.
 
typedef std::complex< Q7storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Attributes

static constexpr bool has_vector = false
 No vector instructions.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 
static constexpr bool has_predicate = false
 No predicated loop.
 
static constexpr int nb_lanes = 1
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

◆ arm_cmsis_dsp::arm_cmsis_dsp::Q15DSPVector

struct arm_cmsis_dsp::arm_cmsis_dsp::Q15DSPVector

Representation of a vector when DSP extension supported.

Public Member Functions

 Q15DSPVector ()
 Create new 0 initialized vector.
 
 Q15DSPVector (int32_t val)
 Create vector initialized from value.
 
 operator int32_t ()
 Return value in vector.
 

Constructor & Destructor Documentation

◆ Q15DSPVector()

Q15DSPVector ( int32_t val)
inlineexplicit

Create vector initialized from value.

Parameters
[in]valThe value

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, DSP, typename std::enable_if< true >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, DSP, typename std::enable_if< true >::type >

Vector description for Q15 with DSP extensions.

Public Types

typedef Q15 type
 Scalar datatype.
 
typedef type::value_type storage_type
 Storage datatype.
 
typedef Q15DSPVector vector
 Vector datatype.
 
typedef Q< 33, 30 > temp_accumulator
 Accumulator datatype.
 
typedef uint32_t predicate_t
 
typedef Q15 type
 Scalar datatype.
 
typedef Q15 storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static Q< 33, 30 > temp_acc_zero ()
 Zero accumulator.
 
static constexpr int16_t zero_lane ()
 Value to write in a lane to write 0.
 
static constexpr int16_t lane_value (const Q15 x)
 Convert to lane value.
 

Static Public Attributes

static constexpr bool has_vector = true
 Has some vector instructions.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 
static constexpr bool has_predicate = false
 No predicated loops.
 
static constexpr int nb_lanes = 2
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Typedef Documentation

◆ predicate_t

typedef uint32_t predicate_t

Dummy type since there is no predicated loop for DSP extensions

Member Function Documentation

◆ lane_value()

static constexpr int16_t lane_value ( const Q15 x)
inlinestaticconstexpr

Convert to lane value.

Parameters
[in]xValue
Returns
Lane value

◆ temp_acc_zero()

static Q< 33, 30 > temp_acc_zero ( )
inlinestatic

Zero accumulator.

Returns
Zero accumulator

◆ zero_lane()

static constexpr int16_t zero_lane ( )
inlinestaticconstexpr

Value to write in a lane to write 0.

Returns
Zero value for a lane

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

Vector datatype for Helium.

Template Parameters
archCurrent architecture

Public Types

typedef float type
 Scalar datatype.
 
typedef float storage_type
 Storage datatype.
 
typedef float32x4_t vector
 Vector datatype.
 
typedef float32x4_t temp_accumulator
 Temp accumulator datatype (must be reduced to final scalar datatype)
 
typedef mve_pred16_t predicate_t
 Predicate datatype.
 
typedef float type
 Scalar datatype.
 
typedef float storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static float32x4_t temp_acc_zero ()
 Temp accumulator initialized to 0.
 
static constexpr float zero_lane ()
 Zero lane.
 
static constexpr float lane_value (const float x)
 Lane value.
 

Static Public Attributes

static constexpr bool has_vector = true
 Has vector instruction.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Is not fixed point.
 
static constexpr bool has_predicate = true
 Has predicated loops.
 
static constexpr int nb_lanes = 4
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Function Documentation

◆ lane_value()

template<typename arch>
static constexpr float lane_value ( const float x)
inlinestaticconstexpr

Lane value.

Parameters
[in]xLane value
Returns
Value with scalar datatype

◆ temp_acc_zero()

template<typename arch>
static float32x4_t temp_acc_zero ( )
inlinestatic

Temp accumulator initialized to 0.

Returns
Temp accumulator initialized to 0

◆ zero_lane()

template<typename arch>
static constexpr float zero_lane ( )
inlinestaticconstexpr

Zero lane.

Returns
Value to write 0 into a lane

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< float >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< float >

vctpq for this datatype

Static Public Member Functions

static mve_pred16_t mk (uint32_t v)
 Make a predicate.
 

Member Function Documentation

◆ mk()

static mve_pred16_t mk ( uint32_t v)
inlinestatic

Make a predicate.

Parameters
[in]vNumber of iterations
Returns
Predicate

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride< float32_t, 0, 1, 2, 3 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride< float32_t, 0, 1, 2, 3 >

Load with generalized stride specialized for <0,1,2,3>

Static Public Member Functions

static float32x4_t run (const float32_t *p)
 Load with generalized stride.
 

Member Function Documentation

◆ run()

static float32x4_t run ( const float32_t * p)
inlinestatic

Load with generalized stride.

Parameters
[in]pLoad address
Returns
Loaded vector

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride_z< float32_t, 0, 1, 2, 3 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride_z< float32_t, 0, 1, 2, 3 >

Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3>

Template Parameters
SList of offsets known at built time

Static Public Member Functions

static float32x4_t run (const float32_t *p, const std::size_t nb, const mve_pred16_t p0)
 Gather load with predicated specialized for <0,1,2,3>
 

Member Function Documentation

◆ run()

static float32x4_t run ( const float32_t * p,
const std::size_t nb,
const mve_pred16_t p0 )
inlinestatic

Gather load with predicated specialized for <0,1,2,3>

Parameters
[in]pLoad address
[in]nbNumber of remaining samples in the loop
[in]p0Predicate for samples in the loop
Returns
Gather load

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride< float32_t, 0, 1, 2, 3 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride< float32_t, 0, 1, 2, 3 >

Generalized store with stride (Specialized for <0,1,2,3>)

Static Public Member Functions

static void run (float32_t *p, const float32x4_t val)
 Scatter store.
 

Member Function Documentation

◆ run()

static void run ( float32_t * p,
const float32x4_t val )
inlinestatic

Scatter store.

Parameters
pStore address
[in]valValue to store

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride_z< float32_t, 0, 1, 2, 3 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride_z< float32_t, 0, 1, 2, 3 >

Scatter store with tail predicate (specialized for <0,1,2,3>)

Static Public Member Functions

static void vstore1_z (float32_t *p, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0)
 Scatter store with tail predicate.
 

Member Function Documentation

◆ vstore1_z()

static void vstore1_z ( float32_t * p,
const float32x4_t val,
const std::size_t nb,
const mve_pred16_t p0 )
inlinestatic

Scatter store with tail predicate.

Parameters
pStore address
[in]valValue to store
[in]nbNumber of remaining loops
[in]p0Loop predicate

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

Vector datatype for Helium.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< float > type
 Scalar datatype.
 
typedef std::complex< float > storage_type
 Storage datatype.
 
typedef ComplexVector< float32x4_t > vector
 Vector datatype.
 
typedef HalfComplexVector< float32x4_t > half_vector
 Half vector datatype.
 
typedef float32x4_t real_vector
 Real vector datatype.
 
typedef ComplexVector< float32x4_t > temp_accumulator
 Temp accumulator datatype (must be reduced to final scalar datatype)
 
typedef bool predicate_t
 Predicate datatype (not used)
 
typedef std::complex< float > type
 Scalar datatype.
 
typedef std::complex< float > storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static ComplexVector< float32x4_t > temp_acc_zero ()
 Temp accumulator initialized to 0.
 

Static Public Attributes

static constexpr bool has_vector = true
 Has vector instruction.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Is not fixed point.
 
static constexpr bool has_predicate = false
 Has predicated loops.
 
static constexpr int nb_lanes = 4
 Number of lanes (each lane being two floats)
 
static constexpr bool support_mixed = true
 If support mixed arithmetic.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Function Documentation

◆ temp_acc_zero()

template<typename arch>
static ComplexVector< float32x4_t > temp_acc_zero ( )
inlinestatic

Temp accumulator initialized to 0.

Returns
Temp accumulator initialized to 0

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride< std::complex< float >, 0, 1, 2, 3 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride< std::complex< float >, 0, 1, 2, 3 >

Load with generalized stride specialized for <0,1,2,3>

Static Public Member Functions

static ComplexVector< float32x4_t > run (const std::complex< float32_t > *p)
 Load with generalized stride.
 

Member Function Documentation

◆ run()

static ComplexVector< float32x4_t > run ( const std::complex< float32_t > * p)
inlinestatic

Load with generalized stride.

Parameters
[in]pLoad address
Returns
Loaded vector

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride< std::complex< float32_t >, 0, 1, 2, 3 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride< std::complex< float32_t >, 0, 1, 2, 3 >

Generalized store with stride (Specialized for <0,1,2,3>)

Static Public Member Functions

static void run (std::complex< float32_t > *p, const ComplexVector< float32x4_t > &val)
 Scatter store.
 

Member Function Documentation

◆ run()

static void run ( std::complex< float32_t > * p,
const ComplexVector< float32x4_t > & val )
inlinestatic

Scatter store.

Parameters
pStore address
[in]valValue to store

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

Vector features for f16 on Helium.

Template Parameters
archCurrent architecture

Public Types

typedef float16_t type
 Scalar datatype.
 
typedef float16_t storage_type
 Storage datatype.
 
typedef float16x8_t vector
 Vector datatype.
 
typedef float16x8_t temp_accumulator
 Temp accumulator datatype.
 
typedef mve_pred16_t predicate_t
 Predicate datatype.
 
typedef float16_t type
 Scalar datatype.
 
typedef float16_t storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static float16x8_t temp_acc_zero ()
 Vector of 0.
 
static constexpr float16_t zero_lane ()
 Value to write 0 in a lane.
 
static constexpr float16_t lane_value (const float16_t x)
 Convert from lane value.
 

Static Public Attributes

static constexpr bool has_vector = true
 Has vector instructions.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Is not fixed point.
 
static constexpr bool has_predicate = true
 Has predicated loop.
 
static constexpr int nb_lanes = 8
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Function Documentation

◆ lane_value()

template<typename arch>
static constexpr float16_t lane_value ( const float16_t x)
inlinestaticconstexpr

Convert from lane value.

Parameters
[in]xLane value
Returns
Lane value with current datatype

◆ temp_acc_zero()

template<typename arch>
static float16x8_t temp_acc_zero ( )
inlinestatic

Vector of 0.

Returns
Vector of 0

◆ zero_lane()

template<typename arch>
static constexpr float16_t zero_lane ( )
inlinestaticconstexpr

Value to write 0 in a lane.

Returns
Value to write 0 in a lane

f16 suffix not supported in C++

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< float16_t >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< float16_t >

vctpq for Helium and f16

Static Public Member Functions

static mve_pred16_t mk (uint32_t v)
 Make predicate.
 

Member Function Documentation

◆ mk()

static mve_pred16_t mk ( uint32_t v)
inlinestatic

Make predicate.

Parameters
[in]vRemaining iterations
Returns
Predicate

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float16_t >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float16_t >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::complex< float16_t >, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

Vector datatype for Helium.

Template Parameters
archCurrent architecture

Public Types

typedef std::complex< float16_t > type
 Scalar datatype.
 
typedef std::complex< float16_t > storage_type
 Storage datatype.
 
typedef ComplexVector< float16x8_t > vector
 Vector datatype.
 
typedef HalfComplexVector< float16x8_t > half_vector
 Half vector datatype.
 
typedef float16x8_t real_vector
 Real vector datatype.
 
typedef ComplexVector< float16x8_t > temp_accumulator
 Temp accumulator datatype (must be reduced to final scalar datatype)
 
typedef bool predicate_t
 Predicate datatype (not used for complex)
 
typedef std::complex< float16_t > type
 Scalar datatype.
 
typedef std::complex< float16_t > storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static ComplexVector< float16x8_t > temp_acc_zero ()
 Temp accumulator initialized to 0.
 

Static Public Attributes

static constexpr bool has_vector = true
 Has vector instruction.
 
static constexpr bool is_float = true
 Is float.
 
static constexpr bool is_fixed = false
 Is not fixed point.
 
static constexpr bool has_predicate = false
 Has predicated loops (not used for complex)
 
static constexpr int nb_lanes = 8
 Number of lanes (each lane being two floats)
 
static constexpr bool support_mixed = true
 If support mixed arithmetic.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Function Documentation

◆ temp_acc_zero()

template<typename arch>
static ComplexVector< float16x8_t > temp_acc_zero ( )
inlinestatic

Temp accumulator initialized to 0.

Returns
Temp accumulator initialized to 0

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride< std::complex< float16_t >, 0, 1, 2, 3, 4, 5, 6, 7 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vload1_gen_stride< std::complex< float16_t >, 0, 1, 2, 3, 4, 5, 6, 7 >

Load with generalized stride specialized for <0,1,2,3,4,5,6,7>

Static Public Member Functions

static ComplexVector< float16x8_t > run (const std::complex< float16_t > *p)
 Load with generalized stride.
 

Member Function Documentation

◆ run()

static ComplexVector< float16x8_t > run ( const std::complex< float16_t > * p)
inlinestatic

Load with generalized stride.

Parameters
[in]pLoad address
Returns
Loaded vector

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride< std::complex< float16_t >, 0, 1, 2, 3, 4, 5, 6, 7 >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vstore1_gen_stride< std::complex< float16_t >, 0, 1, 2, 3, 4, 5, 6, 7 >

Generalized store with stride (Specialized for <0,1,2,3>)

Static Public Member Functions

static void run (std::complex< float16_t > *p, const ComplexVector< float16x8_t > &val)
 Scatter store.
 

Member Function Documentation

◆ run()

static void run ( std::complex< float16_t > * p,
const ComplexVector< float16x8_t > & val )
inlinestatic

Scatter store.

Parameters
pStore address
[in]valValue to store

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >
template<typename arch>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type >

Vector features for Q15 on Helium.

Template Parameters
archCurrent architecture

Public Types

typedef Q15 type
 Scalar datatype.
 
typedef type::value_type storage_type
 Storage datatype (int16_t)
 
typedef int16x8_t vector
 Vector datatype.
 
typedef Q< 33, 30 > temp_accumulator
 Temp accumulator datatype.
 
typedef mve_pred16_t predicate_t
 Predicate for loop.
 
typedef Q15 type
 Scalar datatype.
 
typedef Q15 storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static Q< 33, 30 > temp_acc_zero ()
 Zero.
 
static constexpr int16_t zero_lane ()
 Value to write in a lane to write 0.
 
static constexpr int16_t lane_value (const Q15 x)
 Convert to lane value.
 

Static Public Attributes

static constexpr bool has_vector = true
 Has vector instructions.
 
static constexpr bool is_float = false
 Is not float.
 
static constexpr bool is_fixed = true
 Is fixed point.
 
static constexpr bool has_predicate = true
 Has predicated loop.
 
static constexpr int nb_lanes = 8
 Number of lanes.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Function Documentation

◆ lane_value()

template<typename arch>
static constexpr int16_t lane_value ( const Q15 x)
inlinestaticconstexpr

Convert to lane value.

Parameters
[in]xLane value
Returns
Lane value

◆ temp_acc_zero()

template<typename arch>
static Q< 33, 30 > temp_acc_zero ( )
inlinestatic

Zero.

Returns
Zero with accumulator datatype

◆ zero_lane()

template<typename arch>
static constexpr int16_t zero_lane ( )
inlinestaticconstexpr

Value to write in a lane to write 0.

Returns
Zero value

◆ arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::tuple< E... > >

struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::tuple< E... > >
template<typename ... E>
struct arm_cmsis_dsp::arm_cmsis_dsp::number_traits< std::tuple< E... > >

Number description for a tuple of numbers.

Template Parameters
EDatatype for all numbers

Public Types

typedef std::tuple< typename number_traits< E >::accumulator... > accumulator
 Tuple of accumulator datatype for the accumulator type.
 
typedef std::tuple< typename number_traits< E >::compute_type... > compute_type
 Tuple of compute datatype for the compute type.
 

Static Public Member Functions

static std::tuple< typename number_traits< E >::accumulator... > one ()
 Return of tuples of one values.
 

Static Public Attributes

static constexpr bool is_float = false
 It is not a float number.
 
static constexpr bool is_fixed = false
 It is not a fixed point number.
 

Member Function Documentation

◆ one()

template<typename ... E>
static std::tuple< typename number_traits< E >::accumulator... > one ( )
inlinestatic

Return of tuples of one values.

Returns
Tuples of one values with different datatypes

◆ arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::tuple< E... >, arch >

struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::tuple< E... >, arch >
template<typename arch, typename ... E>
struct arm_cmsis_dsp::arm_cmsis_dsp::vector_traits< std::tuple< E... >, arch >

Tuple of compatible vectors.

Template Parameters
archCurrent architecture
EList of vector dataypes

The vector datatypes must be coherent : have same number of lanes or same lane datatype

Public Types

using RefScalar = typename std::tuple_element<0,std::tuple<E...>>::type
 First element of tuple defines the scalar datatype.
 
typedef std::tuple< typename vector_traits< E, arch >::temp_accumulator... > temp_accumulator
 Temporary accumulator datatype.
 
typedef std::tuple< typename vector_traits< E, arch >::vector... > vector
 Vector datatype.
 
typedef std::tuple< typename vector_traits< E, arch >::real_vector... > real_vector
 Real vector datatype.
 
typedef std::tuple< typename vector_traits< E, arch >::predicate_t... > predicate_t
 Predicate datatype.
 
typedef std::tuple< E... > type
 Scalar datatype.
 
typedef std::tuple< E... > storage_type
 Storage type (for instance for Q15 scalar the storage is int16_t)
 

Static Public Member Functions

static temp_accumulator temp_acc_zero ()
 Zero represented with temp accumulator datatype.
 

Static Public Attributes

static constexpr int nb_lanes = vector_traits<RefScalar,arch>::nb_lanes
 Number of lanes (from RefScalar)
 
static constexpr bool has_vector = vector_traits<RefScalar,arch>::has_vector
 Has vector instructions.
 
static constexpr bool is_float = vector_traits<RefScalar,arch>::is_float
 Is a float.
 
static constexpr bool is_fixed = vector_traits<RefScalar,arch>::is_fixed
 Is fixed point.
 
static constexpr bool has_predicate = vector_traits<RefScalar,arch>::has_predicate
 Has predicated loop.
 
static constexpr bool has_vector
 True if scalar type has a related vector type.
 
static constexpr bool is_float
 True if scalar type is a float (half, float or double)
 
static constexpr bool is_fixed
 True if scalar type is fixed point.
 

Member Function Documentation

◆ temp_acc_zero()

template<typename arch, typename ... E>
static temp_accumulator temp_acc_zero ( )
inlinestatic

Zero represented with temp accumulator datatype.

Returns
Zero represented with temp accumulator datatype

◆ arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< std::tuple< E... > >

struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< std::tuple< E... > >
template<typename ... E>
struct arm_cmsis_dsp::arm_cmsis_dsp::inner::vctpq< std::tuple< E... > >

Tuple of predicates.

Template Parameters
ETuple of datatypes

The datatypes must be coherent (same number of lanes). The first element is used to infer the vctpq instruction to use

Static Public Member Functions

static auto mk (const uint32_t v)
 Make a predicate for predicated loop.
 

Member Function Documentation

◆ mk()

template<typename ... E>
static auto mk ( const uint32_t v)
inlinestatic

Make a predicate for predicated loop.

Parameters
[in]vRemaining number of iterations
Returns
Predicate

◆ arm_cmsis_dsp::Vector_Base

struct arm_cmsis_dsp::Vector_Base
template<typename P>
struct arm_cmsis_dsp::Vector_Base< P >

Storage for a vector.

Template Parameters
PType of the scalar

Public Types

typedef P element_type
 Type of vector elements.
 
using Vector = typename vector_traits<P>::vector
 Type of vectors for a vector architecture and for scalar datatype P.
 

Public Member Functions

vector_length_t length () const
 Vector dimension.
 
P * ptr () const
 Pointer to storage buffer.
 
P * ptr (const index_t i) const
 Pointer to storage buffer at index i.
 
const P * const_ptr () const
 Pointer to storage buffer.
 
const P * const_ptr (const index_t i) const
 Pointer to storage buffer at index i.
 
P * begin () const
 Iterator begin.
 
P * end () const
 Iterator end.
 
P & operator[] (const index_t i)
 Element at index i.
 
P & operator[] (const index_t i) const
 Element at index i.
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true>
void vector_store (const index_t i, const Vector val) const
 Vector store at index i
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
void vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const
 Vector store at index i with predicated tail
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index i with predicated tail
 
Vector const vector_op (const index_t i) const
 Vector operation at index i
 

Member Function Documentation

◆ begin()

template<typename P>
P * begin ( ) const
inline

Iterator begin.

Returns
Pointer to start of buffer

◆ const_ptr() [1/2]

template<typename P>
const P * const_ptr ( ) const
inline

Pointer to storage buffer.

Returns
Pointer to constant storage

◆ const_ptr() [2/2]

template<typename P>
const P * const_ptr ( const index_t i) const
inline

Pointer to storage buffer at index i.

Parameters
iIndex in buffer
Returns
Pointer to constant storage

◆ end()

template<typename P>
P * end ( ) const
inline

Iterator end.

Returns
Pointer to first element after end of buffer

◆ length()

template<typename P>
vector_length_t length ( ) const
inline

Vector dimension.

Returns
Vector dimension

◆ operator[]() [1/2]

template<typename P>
P & operator[] ( const index_t i)
inline

Element at index i.

Parameters
iindex
Returns
Reference to element

◆ operator[]() [2/2]

template<typename P>
P & operator[] ( const index_t i) const
inline

Element at index i.

Parameters
iindex
Returns
Reference to element

◆ ptr() [1/2]

template<typename P>
P * ptr ( ) const
inline

Pointer to storage buffer.

Returns
Pointer to storage
Examples
dsppp_example/Dsppp/main.cpp.

◆ ptr() [2/2]

template<typename P>
P * ptr ( const index_t i) const
inline

Pointer to storage buffer at index i.

Parameters
iIndex in buffer
Returns
Pointer to storage

◆ vector_op()

template<typename P>
Vector const vector_op ( const index_t i) const
inline

Vector operation at index i

Parameters
iindex
Returns
Result of operation

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load

◆ vector_op_tail()

template<typename P>
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
Vector const vector_op_tail ( const index_t i,
const vector_length_t remaining ) const
inline

Vector operation at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
Returns
Result of operation

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load

◆ vector_store()

template<typename P>
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true>
void vector_store ( const index_t i,
const Vector val ) const
inline

Vector store at index i

Template Parameters
Tscalar datatype
Parameters
iindex
valVector value

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype

◆ vector_store_tail()

template<typename P>
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
void vector_store_tail ( const index_t i,
const vector_length_t remaining,
const Vector val ) const
inline

Vector store at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
valVector value to write at index i with tail predication

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication

◆ arm_cmsis_dsp::Vector

struct arm_cmsis_dsp::Vector
template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
struct arm_cmsis_dsp::Vector< P, L, Allocator >

Vector template for size knonw at build time.

Template Parameters
PType of the scalar
LVector length in number of elements. Negative if length not known at build time. It is the default value
AllocatorMemory allocator to use. By default it is the macro TMP_ALLOC
Examples
dsppp_example/Dsppp/main.cpp.

Public Types

using element_type = P
 Type of vector elements.
 
- Public Types inherited from Vector_Base< P >
typedef P element_type
 Type of vector elements.
 
using Vector = typename vector_traits<P>::vector
 Type of vectors for a vector architecture and for scalar datatype P.
 

Public Member Functions

 Vector ()
 Construct a new vector.
 
 Vector (P init_val)
 Construct a new vector and initialize it.
 
 Vector (const std::initializer_list< P > &l)
 Construct a new vector and initialize it with a list.
 
template<template< int > typename OtherAllocator>
 Vector (const Vector< P, L, OtherAllocator > &other)
 Create a vector from a vector using a different memory allocator.
 
template<int S>
 Vector (const VectorView< P, S > &other)
 Create a vector from a VectorView.
 
template<typename Derived>
 Vector (const _Expr< Derived > &other)
 Create a vector from an expression.
 
template<typename Derived>
Vectoroperator= (const _Expr< Derived > &other)
 Copy result of an expression to a vector content.
 
template<typename T, typename std::enable_if< is_scalar< T >(), bool >::type = true>
Vectoroperator= (const T other)
 Fill a vector with a constant.
 
template<typename Derived>
Vectoroperator+= (const _Expr< Derived > &other)
 Elementwise add the result of an expression to a vector.
 
Vectoroperator+= (const Vector &other)
 Elementwise add vector to another vector.
 
Vectoroperator+= (const P other)
 Elementwise add a constant to a vector.
 
template<typename Derived>
Vectoroperator-= (const _Expr< Derived > &other)
 Elementwise subtract the result of an expression from a vector.
 
Vectoroperator-= (const Vector &other)
 Elementwise subtract a vector from a vector.
 
Vectoroperator-= (const P other)
 Elementwise subtract a constant from a vector.
 
template<typename Derived>
Vectoroperator*= (const _Expr< Derived > &other)
 Elementwise multiply the result of an expression with a vector.
 
Vectoroperator*= (const Vector &other)
 Elementwise multiply a vector with a vector.
 
Vectoroperator*= (const P other)
 Elementwise multiply a constant with a vector.
 
template<int S = 1>
VectorView< P, S > sub (const index_t start=0, const index_t stop=L)
 Create a vector view.
 
- Public Member Functions inherited from Vector_Base< P >
vector_length_t length () const
 Vector dimension.
 
P * ptr () const
 Pointer to storage buffer.
 
P * ptr (const index_t i) const
 Pointer to storage buffer at index i.
 
const P * const_ptr () const
 Pointer to storage buffer.
 
const P * const_ptr (const index_t i) const
 Pointer to storage buffer at index i.
 
P * begin () const
 Iterator begin.
 
P * end () const
 Iterator end.
 
P & operator[] (const index_t i)
 Element at index i.
 
P & operator[] (const index_t i) const
 Element at index i.
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true>
void vector_store (const index_t i, const Vector val) const
 Vector store at index i
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
void vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const
 Vector store at index i with predicated tail
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index i with predicated tail
 
Vector const vector_op (const index_t i) const
 Vector operation at index i
 

Static Public Member Functions

static char * allocate ()
 Allocate a buffer for this vector using the memory allocator.
 

Static Public Attributes

static constexpr vector_length_t vector_size = sizeof(P)*L
 Length of the vector when known at build time.
 

Constructor & Destructor Documentation

◆ Vector() [1/6]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector ( )
inline

Construct a new vector.

        The length is known at build time.

◆ Vector() [2/6]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector ( P init_val)
inlineexplicit

Construct a new vector and initialize it.

        The length is known at build time.
Parameters
init_valInitialization value

◆ Vector() [3/6]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector ( const std::initializer_list< P > & l)
inline

Construct a new vector and initialize it with a list.

        A vector can be initialized like an array using {} syntax
        The length is known at build time.
Parameters
lInitialization list

◆ Vector() [4/6]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<template< int > typename OtherAllocator>
Vector ( const Vector< P, L, OtherAllocator > & other)
inlineexplicit

Create a vector from a vector using a different memory allocator.

Parameters
otherOther vector using a different memory allocator

◆ Vector() [5/6]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<int S>
Vector ( const VectorView< P, S > & other)
inlineexplicit

Create a vector from a VectorView.

Template Parameters
SThe stride of the vector view known at build time
Parameters
otherThe vector view

◆ Vector() [6/6]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<typename Derived>
Vector ( const _Expr< Derived > & other)
inline

Create a vector from an expression.

Template Parameters
DerivedThe type representing the abstract syntax tree
Parameters
otherThe expression

It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop

Member Function Documentation

◆ allocate()

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
static char * allocate ( )
inlinestatic

Allocate a buffer for this vector using the memory allocator.

Returns
A new memory buffer

◆ operator*=() [1/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<typename Derived>
Vector & operator*= ( const _Expr< Derived > & other)
inline

Elementwise multiply the result of an expression with a vector.

Template Parameters
DerivedThe type representing the abstract syntax tree of the expression
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator*=() [2/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector & operator*= ( const P other)
inline

Elementwise multiply a constant with a vector.

Template Parameters
DerivedConstant datatype
Parameters
otherThe constant
Returns
A reference to the vector

◆ operator*=() [3/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector & operator*= ( const Vector< P, L, Allocator > & other)
inline

Elementwise multiply a vector with a vector.

Parameters
otherThe othr vector
Returns
A reference to the vector

◆ operator+=() [1/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<typename Derived>
Vector & operator+= ( const _Expr< Derived > & other)
inline

Elementwise add the result of an expression to a vector.

Template Parameters
DerivedThe type representing the abstract syntax tree of the expression
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator+=() [2/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector & operator+= ( const P other)
inline

Elementwise add a constant to a vector.

Template Parameters
PThe constant datatype
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator+=() [3/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector & operator+= ( const Vector< P, L, Allocator > & other)
inline

Elementwise add vector to another vector.

Parameters
otherThe vector
Returns
A reference to the vector

◆ operator-=() [1/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<typename Derived>
Vector & operator-= ( const _Expr< Derived > & other)
inline

Elementwise subtract the result of an expression from a vector.

Template Parameters
DerivedThe type representing the abstract syntax tree of the expression
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator-=() [2/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector & operator-= ( const P other)
inline

Elementwise subtract a constant from a vector.

Template Parameters
PDatatype of the constant
Parameters
otherThe constant
Returns
A reference to the vector

◆ operator-=() [3/3]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
Vector & operator-= ( const Vector< P, L, Allocator > & other)
inline

Elementwise subtract a vector from a vector.

Parameters
otherThe other vector
Returns
A reference to the vector

◆ operator=() [1/2]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<typename Derived>
Vector & operator= ( const _Expr< Derived > & other)
inline

Copy result of an expression to a vector content.

Template Parameters
DerivedThe type representing the abstract syntax tree
Parameters
otherThe expression
Returns
A reference to the vector

It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop

◆ operator=() [2/2]

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<typename T, typename std::enable_if< is_scalar< T >(), bool >::type = true>
Vector & operator= ( const T other)
inline

Fill a vector with a constant.

Template Parameters
TThe constant datatype
Parameters
otherThe const
Returns
A reference to the vector

◆ sub()

template<typename P, int L = DYNAMIC, template< int > typename Allocator = malloc_allocator>
template<int S = 1>
VectorView< P, S > sub ( const index_t start = 0,
const index_t stop = L )
inline

Create a vector view.

Template Parameters
SStride known at build time
Parameters
startStart index for the vector view
stopStop index for the vector view (first element after the vector view) Default is length of the vector if known at build time.
Returns
A reference to the vector view

◆ arm_cmsis_dsp::Vector< P, DYNAMIC, Allocator >

struct arm_cmsis_dsp::Vector< P, DYNAMIC, Allocator >
template<typename P, template< int > typename Allocator>
struct arm_cmsis_dsp::Vector< P, DYNAMIC, Allocator >

Vector template for dynamic vector (size known at runtime)

Template Parameters
PType of the scalar
AllocatorMemory allocator to use. By default it is the macro TMP_ALLOC

Public Types

using element_type
 Type of vector elements.
 
- Public Types inherited from Vector_Base< P >
typedef P element_type
 Type of vector elements.
 
using Vector = typename vector_traits<P>::vector
 Type of vectors for a vector architecture and for scalar datatype P.
 

Public Member Functions

 Vector (vector_length_t length, P init_val)
 Create a new vector.
 
 Vector (vector_length_t length)
 Create a new vector.
 
 Vector (const std::initializer_list< P > &l)
 Create a new vector.
 
template<int K, template< int > typename OtherAllocator>
 Vector (const Vector< P, K, OtherAllocator > &other)
 Create a new vector from a vector using a different memory allocator.
 
 Vector (const Vector &other)
 Create a new vector from a vector of same type.
 
template<int S>
 Vector (const VectorView< P, S > &other)
 Create a new vector from a vector view.
 
template<typename Derived>
 Vector (const _Expr< Derived > &other)
 Create a new vector from an expressipn.
 
template<typename Derived>
Vectoroperator= (const _Expr< Derived > &other)
 Fill a vector with an expression.
 
template<typename T, typename std::enable_if< is_scalar< T >(), bool >::type = true>
Vectoroperator= (const T other)
 Fill a vector with a scalar.
 
template<typename Derived>
Vectoroperator+= (const _Expr< Derived > &other)
 Elementwise add an expression to a vector.
 
Vectoroperator+= (const Vector &other)
 Elementwise add a vector to a vector.
 
Vectoroperator+= (const P other)
 Elementwise add a scalar to a vector.
 
template<typename Derived>
Vectoroperator-= (const _Expr< Derived > &other)
 Elementwise subtract an expression to a vector.
 
Vectoroperator-= (const Vector &other)
 Elementwise subtract a vector to a vector.
 
Vectoroperator-= (const P other)
 Elementwise subtract a scalar to a vector.
 
template<typename Derived>
Vectoroperator*= (const _Expr< Derived > &other)
 Elementwise multiply an expression with a vector.
 
Vectoroperator*= (const Vector &other)
 Elementwise multiply a vector with a vector.
 
Vectoroperator*= (const P other)
 Elementwise multiply a scalar with a vector.
 
template<int S = 1>
VectorView< P, S > sub (const index_t start=0, const index_t stop=-1)
 Create a vector view.
 
 Vector ()
 Construct a new vector.
 
 Vector (P init_val)
 Construct a new vector and initialize it.
 
 Vector (const std::initializer_list< P > &l)
 Construct a new vector and initialize it with a list.
 
 Vector (const Vector< P, L, OtherAllocator > &other)
 Create a vector from a vector using a different memory allocator.
 
 Vector (const VectorView< P, S > &other)
 Create a vector from a VectorView.
 
 Vector (const _Expr< Derived > &other)
 Create a vector from an expression.
 
Vectoroperator= (const _Expr< Derived > &other)
 Copy result of an expression to a vector content.
 
Vectoroperator= (const T other)
 Fill a vector with a constant.
 
Vectoroperator+= (const _Expr< Derived > &other)
 Elementwise add the result of an expression to a vector.
 
Vectoroperator+= (const Vector &other)
 Elementwise add vector to another vector.
 
Vectoroperator+= (const P other)
 Elementwise add a constant to a vector.
 
Vectoroperator-= (const _Expr< Derived > &other)
 Elementwise subtract the result of an expression from a vector.
 
Vectoroperator-= (const Vector &other)
 Elementwise subtract a vector from a vector.
 
Vectoroperator-= (const P other)
 Elementwise subtract a constant from a vector.
 
Vectoroperator*= (const _Expr< Derived > &other)
 Elementwise multiply the result of an expression with a vector.
 
Vectoroperator*= (const Vector &other)
 Elementwise multiply a vector with a vector.
 
Vectoroperator*= (const P other)
 Elementwise multiply a constant with a vector.
 
VectorView< P, S > sub (const index_t start=0, const index_t stop=L)
 Create a vector view.
 
- Public Member Functions inherited from Vector_Base< P >
vector_length_t length () const
 Vector dimension.
 
P * ptr () const
 Pointer to storage buffer.
 
P * ptr (const index_t i) const
 Pointer to storage buffer at index i.
 
const P * const_ptr () const
 Pointer to storage buffer.
 
const P * const_ptr (const index_t i) const
 Pointer to storage buffer at index i.
 
P * begin () const
 Iterator begin.
 
P * end () const
 Iterator end.
 
P & operator[] (const index_t i)
 Element at index i.
 
P & operator[] (const index_t i) const
 Element at index i.
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true>
void vector_store (const index_t i, const Vector val) const
 Vector store at index i
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
void vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const
 Vector store at index i with predicated tail
 
template<typename T = P, typename std::enable_if< vector_traits< T >::has_predicate, bool >::type = true>
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index i with predicated tail
 
Vector const vector_op (const index_t i) const
 Vector operation at index i
 

Static Public Member Functions

static char * allocate (vector_length_t length)
 Allocate a buffer for this vector using the memory allocator.
 
static char * allocate ()
 Allocate a buffer for this vector using the memory allocator.
 

Static Public Attributes

static constexpr vector_length_t vector_size
 Length of the vector when known at build time.
 

Constructor & Destructor Documentation

◆ Vector() [1/13]

template<typename P, template< int > typename Allocator>
Vector ( vector_length_t length,
P init_val )
inlineexplicit

Create a new vector.

Parameters
lengthVector dimension
init_valInitialization value

◆ Vector() [2/13]

template<typename P, template< int > typename Allocator>
Vector ( vector_length_t length)
inlineexplicit

Create a new vector.

Parameters
lengthVector dimension

◆ Vector() [3/13]

template<typename P, template< int > typename Allocator>
Vector ( const std::initializer_list< P > & l)
inlineexplicit

Create a new vector.

Parameters
lInitializer list A vector can be initialized like an array using {} syntax

◆ Vector() [4/13]

template<typename P, template< int > typename Allocator>
template<int K, template< int > typename OtherAllocator>
Vector ( const Vector< P, K, OtherAllocator > & other)
inlineexplicit

Create a new vector from a vector using a different memory allocator.

Template Parameters
KDimension of other vector (statically known or dynamic)
Parameters
otherThe vector to copy

◆ Vector() [5/13]

template<typename P, template< int > typename Allocator>
Vector ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Create a new vector from a vector of same type.

Parameters
otherThe vector to copy

◆ Vector() [6/13]

template<typename P, template< int > typename Allocator>
template<int S>
Vector ( const VectorView< P, S > & other)
inlineexplicit

Create a new vector from a vector view.

Template Parameters
SStride of vector view known at build time
Parameters
otherThe vector to copy

◆ Vector() [7/13]

template<typename P, template< int > typename Allocator>
template<typename Derived>
Vector ( const _Expr< Derived > & other)
inline

Create a new vector from an expressipn.

Template Parameters
DerivedType representing the abstract syntax tree of the expression
Parameters
otherThe expression to evaluate

◆ Vector() [8/13]

Vector ( )
inline

Construct a new vector.

        The length is known at build time.

◆ Vector() [9/13]

Vector ( P init_val)
inlineexplicit

Construct a new vector and initialize it.

        The length is known at build time.
Parameters
init_valInitialization value

◆ Vector() [10/13]

Vector ( const std::initializer_list< P > & l)
inline

Construct a new vector and initialize it with a list.

        A vector can be initialized like an array using {} syntax
        The length is known at build time.
Parameters
lInitialization list

◆ Vector() [11/13]

Vector ( const Vector< P, L, OtherAllocator > & other)
inlineexplicit

Create a vector from a vector using a different memory allocator.

Parameters
otherOther vector using a different memory allocator

◆ Vector() [12/13]

Vector ( const VectorView< P, S > & other)
inlineexplicit

Create a vector from a VectorView.

Template Parameters
SThe stride of the vector view known at build time
Parameters
otherThe vector view

◆ Vector() [13/13]

Vector ( const _Expr< Derived > & other)
inline

Create a vector from an expression.

Template Parameters
DerivedThe type representing the abstract syntax tree
Parameters
otherThe expression

It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop

Member Function Documentation

◆ allocate() [1/2]

static char * allocate ( )
inlinestatic

Allocate a buffer for this vector using the memory allocator.

Returns
A new memory buffer

◆ allocate() [2/2]

template<typename P, template< int > typename Allocator>
static char * allocate ( vector_length_t length)
inlinestatic

Allocate a buffer for this vector using the memory allocator.

Parameters
lengthVector dimension
Returns
A new memory buffer

◆ operator*=() [1/6]

Vector & operator*= ( const _Expr< Derived > & other)
inline

Elementwise multiply the result of an expression with a vector.

Template Parameters
DerivedThe type representing the abstract syntax tree of the expression
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator*=() [2/6]

template<typename P, template< int > typename Allocator>
template<typename Derived>
Vector & operator*= ( const _Expr< Derived > & other)
inline

Elementwise multiply an expression with a vector.

Template Parameters
DerivedType representing the abstract syntax tree of the expression
Parameters
otherThe expression to evaluate
Returns
A reference to the vector

◆ operator*=() [3/6]

Vector & operator*= ( const P other)
inline

Elementwise multiply a constant with a vector.

Template Parameters
DerivedConstant datatype
Parameters
otherThe constant
Returns
A reference to the vector

◆ operator*=() [4/6]

template<typename P, template< int > typename Allocator>
Vector & operator*= ( const P other)
inline

Elementwise multiply a scalar with a vector.

Template Parameters
PScalar datatype
Parameters
otherThe scalar
Returns
A reference to the vector

◆ operator*=() [5/6]

Vector & operator*= ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Elementwise multiply a vector with a vector.

Parameters
otherThe othr vector
Returns
A reference to the vector

◆ operator*=() [6/6]

template<typename P, template< int > typename Allocator>
Vector & operator*= ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Elementwise multiply a vector with a vector.

Parameters
otherThe vector to add
Returns
A reference to the vector

◆ operator+=() [1/6]

Vector & operator+= ( const _Expr< Derived > & other)
inline

Elementwise add the result of an expression to a vector.

Template Parameters
DerivedThe type representing the abstract syntax tree of the expression
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator+=() [2/6]

template<typename P, template< int > typename Allocator>
template<typename Derived>
Vector & operator+= ( const _Expr< Derived > & other)
inline

Elementwise add an expression to a vector.

Template Parameters
DerivedType representing the abstract syntax tree of the expression
Parameters
otherThe expression to evaluate
Returns
A reference to the vector

◆ operator+=() [3/6]

Vector & operator+= ( const P other)
inline

Elementwise add a constant to a vector.

Template Parameters
PThe constant datatype
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator+=() [4/6]

template<typename P, template< int > typename Allocator>
Vector & operator+= ( const P other)
inline

Elementwise add a scalar to a vector.

Template Parameters
PScalar datatype
Parameters
otherThe scalar
Returns
A reference to the vector

◆ operator+=() [5/6]

Vector & operator+= ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Elementwise add vector to another vector.

Parameters
otherThe vector
Returns
A reference to the vector

◆ operator+=() [6/6]

template<typename P, template< int > typename Allocator>
Vector & operator+= ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Elementwise add a vector to a vector.

Parameters
otherThe vector to add
Returns
A reference to the vector

◆ operator-=() [1/6]

Vector & operator-= ( const _Expr< Derived > & other)
inline

Elementwise subtract the result of an expression from a vector.

Template Parameters
DerivedThe type representing the abstract syntax tree of the expression
Parameters
otherThe expression
Returns
A reference to the vector

◆ operator-=() [2/6]

template<typename P, template< int > typename Allocator>
template<typename Derived>
Vector & operator-= ( const _Expr< Derived > & other)
inline

Elementwise subtract an expression to a vector.

Template Parameters
DerivedType representing the abstract syntax tree of the expression
Parameters
otherThe expression to evaluate
Returns
A reference to the vector

◆ operator-=() [3/6]

Vector & operator-= ( const P other)
inline

Elementwise subtract a constant from a vector.

Template Parameters
PDatatype of the constant
Parameters
otherThe constant
Returns
A reference to the vector

◆ operator-=() [4/6]

template<typename P, template< int > typename Allocator>
Vector & operator-= ( const P other)
inline

Elementwise subtract a scalar to a vector.

Template Parameters
PScalar datatype
Parameters
otherThe scalar
Returns
A reference to the vector

◆ operator-=() [5/6]

Vector & operator-= ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Elementwise subtract a vector from a vector.

Parameters
otherThe other vector
Returns
A reference to the vector

◆ operator-=() [6/6]

template<typename P, template< int > typename Allocator>
Vector & operator-= ( const Vector< P, DYNAMIC, Allocator > & other)
inline

Elementwise subtract a vector to a vector.

Parameters
otherThe vector to add
Returns
A reference to the vector

◆ operator=() [1/4]

Vector & operator= ( const _Expr< Derived > & other)
inline

Copy result of an expression to a vector content.

Template Parameters
DerivedThe type representing the abstract syntax tree
Parameters
otherThe expression
Returns
A reference to the vector

It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop

◆ operator=() [2/4]

template<typename P, template< int > typename Allocator>
template<typename Derived>
Vector & operator= ( const _Expr< Derived > & other)
inline

Fill a vector with an expression.

Template Parameters
DerivedType representing the abstract syntax tree of the expression
Parameters
otherThe expression to evaluate
Returns
A reference to the vector

◆ operator=() [3/4]

Vector & operator= ( const T other)
inline

Fill a vector with a constant.

Template Parameters
TThe constant datatype
Parameters
otherThe const
Returns
A reference to the vector

◆ operator=() [4/4]

template<typename P, template< int > typename Allocator>
template<typename T, typename std::enable_if< is_scalar< T >(), bool >::type = true>
Vector & operator= ( const T other)
inline

Fill a vector with a scalar.

Template Parameters
TScalar datatype
Parameters
otherThe scalar
Returns
A reference to the vector

◆ sub() [1/2]

template<typename P, template< int > typename Allocator>
template<int S = 1>
VectorView< P, S > sub ( const index_t start = 0,
const index_t stop = -1 )
inline

Create a vector view.

Template Parameters
Sstride
Parameters
startStart index of view
stopStop index of view (first index after end of view) By default it is the length of the vector.
Returns
The vector view

◆ sub() [2/2]

VectorView< P, S > sub ( const index_t start = 0,
const index_t stop = L )
inline

Create a vector view.

Template Parameters
SStride known at build time
Parameters
startStart index for the vector view
stopStop index for the vector view (first element after the vector view) Default is length of the vector if known at build time.
Returns
A reference to the vector view

◆ arm_cmsis_dsp::VectorView

struct arm_cmsis_dsp::VectorView
template<typename T, int stride = 1>
struct arm_cmsis_dsp::VectorView< T, stride >

Vector view.

Template Parameters
TType of the scalar
SStride known at build time (default 1)

Public Types

using Vector = typename vector_traits<T>::vector
 Type of vectors for a vector architecture and for scalar datatype P.
 

Public Member Functions

 VectorView (T *v, const vector_length_t start, const vector_length_t stop)
 Create a vector view on a buffer.
 
 VectorView (const Vector_Base< T > &v)
 Create a vector on a vector.
 
 VectorView (const Vector_Base< T > &v, const index_t start, const index_t stop)
 Create a vector view on vector.
 
vector_length_t length () const
 Vector view dimension.
 
T * ptr () const
 Pointer to view storage.
 
T * ptr (const index_t i) const
 Pointer to view storage at index i.
 
const T * const_ptr () const
 Pointer to view constant storage.
 
const T * const_ptr (const index_t i) const
 Pointer to view constant storage at index i.
 
T & operator[] (const index_t i)
 Element at index i.
 
T & operator[] (const index_t i) const
 Element at index i.
 
void vector_store (const index_t i, const Vector val)
 Vector store at index i
 
void vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val)
 Vector store at index i with predicated tail
 
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index i with predicated tail
 
Vector const vector_op (const index_t i) const
 Vector operation at index i
 
 VectorView (const VectorView &other)
 Create a vector view from another view.
 
 VectorView (VectorView &&other)
 Move a vector view to another view.
 
template<typename Derived>
VectorViewoperator= (const _Expr< Derived > &other)
 Assign an expression to a vector view.
 
VectorViewoperator= (const T val)
 Assign a scalar to a vector view.
 
template<typename Derived>
VectorViewoperator+= (const _Expr< Derived > &other)
 Elementwise add an expression to a vector view.
 
VectorViewoperator+= (const VectorView &other)
 Elementwise add a vector view to a vector view.
 
VectorViewoperator+= (const T other)
 Elementwise add a scalar to a vector view.
 
template<typename Derived>
VectorViewoperator-= (const _Expr< Derived > &other)
 Elementwise subtract an expression to a vector view.
 
VectorViewoperator-= (const VectorView &other)
 Elementwise subtract a vector view to a vector view.
 
VectorViewoperator-= (const T other)
 Elementwise subtract a scalar to a vector view.
 
template<typename Derived>
VectorViewoperator*= (const _Expr< Derived > &other)
 Elementwise multiply an expression to a vector view.
 
VectorViewoperator*= (const VectorView &other)
 Elementwise multiply a vector view to a vector view.
 
VectorViewoperator*= (const T other)
 Elementwise multiply a scalar to a vector view.
 
template<int S = 1>
VectorView< T, S *stride > sub (const index_t start=0, const index_t stop=-1)
 Create a sub vector (a view of a view)
 
template<int S = 1>
const VectorView< T, S *stride > sub (const index_t start=0, const index_t stop=-1) const
 Create a constant sub vector (a view of a view)
 

Static Public Member Functions

static constexpr vector_length_t compute_length (const index_t start, const index_t stop)
 Compute the number of elements in the vector view.
 

Constructor & Destructor Documentation

◆ VectorView() [1/5]

template<typename T, int stride = 1>
VectorView ( T * v,
const vector_length_t start,
const vector_length_t stop )
inlineexplicit

Create a vector view on a buffer.

Parameters
vBuffer of samples (not owned by the view)
startStart index of the view
stopStop index of the view (first element after the view)

◆ VectorView() [2/5]

template<typename T, int stride = 1>
VectorView ( const Vector_Base< T > & v)
inlineexplicit

Create a vector on a vector.

Parameters
vVector storage (not owned by the view)

◆ VectorView() [3/5]

template<typename T, int stride = 1>
VectorView ( const Vector_Base< T > & v,
const index_t start,
const index_t stop )
inlineexplicit

Create a vector view on vector.

Parameters
vVector storage (not owned by the view)
startStart index of the view
stopStop index of the view (first element after the view)

◆ VectorView() [4/5]

template<typename T, int stride = 1>
VectorView ( const VectorView< T, stride > & other)
inline

Create a vector view from another view.

Parameters
otherthe other vector view

The new vector view will point to the same storage as the other vector view. No copy of element is occurring. To copy vector view content, the expr and copy operators are needed.

◆ VectorView() [5/5]

template<typename T, int stride = 1>
VectorView ( VectorView< T, stride > && other)
inline

Move a vector view to another view.

Parameters
otherthe other vector view

The new vector view will point to the same storage as the other vector view. No copy of element is occurring.

The other vector view is no more valid (points to null storage)

Member Function Documentation

◆ compute_length()

template<typename T, int stride = 1>
static constexpr vector_length_t compute_length ( const index_t start,
const index_t stop )
inlinestaticconstexpr

Compute the number of elements in the vector view.

Parameters
startVector view start index
stopVector view stop index (first element after the view)
Returns
Vector dimension

◆ const_ptr() [1/2]

template<typename T, int stride = 1>
const T * const_ptr ( ) const
inline

Pointer to view constant storage.

Returns
Pointer to start of constant storage

◆ const_ptr() [2/2]

template<typename T, int stride = 1>
const T * const_ptr ( const index_t i) const
inline

Pointer to view constant storage at index i.

Parameters
iIndex
Returns
Pointer to constant storage at index i

The stride is used to compute this pointer. The index is scaled by the stride.

◆ length()

template<typename T, int stride = 1>
vector_length_t length ( ) const
inline

Vector view dimension.

Returns
Number of elements

◆ operator*=() [1/3]

template<typename T, int stride = 1>
template<typename Derived>
VectorView & operator*= ( const _Expr< Derived > & other)
inline

Elementwise multiply an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator*=() [2/3]

template<typename T, int stride = 1>
VectorView & operator*= ( const T other)
inline

Elementwise multiply a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator*=() [3/3]

template<typename T, int stride = 1>
VectorView & operator*= ( const VectorView< T, stride > & other)
inline

Elementwise multiply a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator+=() [1/3]

template<typename T, int stride = 1>
template<typename Derived>
VectorView & operator+= ( const _Expr< Derived > & other)
inline

Elementwise add an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator+=() [2/3]

template<typename T, int stride = 1>
VectorView & operator+= ( const T other)
inline

Elementwise add a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator+=() [3/3]

template<typename T, int stride = 1>
VectorView & operator+= ( const VectorView< T, stride > & other)
inline

Elementwise add a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator-=() [1/3]

template<typename T, int stride = 1>
template<typename Derived>
VectorView & operator-= ( const _Expr< Derived > & other)
inline

Elementwise subtract an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator-=() [2/3]

template<typename T, int stride = 1>
VectorView & operator-= ( const T other)
inline

Elementwise subtract a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator-=() [3/3]

template<typename T, int stride = 1>
VectorView & operator-= ( const VectorView< T, stride > & other)
inline

Elementwise subtract a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator=() [1/2]

template<typename T, int stride = 1>
template<typename Derived>
VectorView & operator= ( const _Expr< Derived > & other)
inline

Assign an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

Evaluate an expression an assign its result to the vector view

◆ operator=() [2/2]

template<typename T, int stride = 1>
VectorView & operator= ( const T val)
inline

Assign a scalar to a vector view.

Parameters
valthe scalar
Returns
the vector view

◆ operator[]() [1/2]

template<typename T, int stride = 1>
T & operator[] ( const index_t i)
inline

Element at index i.

Parameters
iIndex
Returns
Reference to element

The stride is used to compute this reference. The index is scaled by the stride.

◆ operator[]() [2/2]

template<typename T, int stride = 1>
T & operator[] ( const index_t i) const
inline

Element at index i.

Parameters
iIndex
Returns
Reference to element

The stride is used to compute this reference. The index is scaled by the stride.

◆ ptr() [1/2]

template<typename T, int stride = 1>
T * ptr ( ) const
inline

Pointer to view storage.

Returns
Pointer to start of storage

◆ ptr() [2/2]

template<typename T, int stride = 1>
T * ptr ( const index_t i) const
inline

Pointer to view storage at index i.

Parameters
iIndex
Returns
Pointer to storage at index i

The stride is used to compute this pointer. The index is scaled by the stride.

◆ sub() [1/2]

template<typename T, int stride = 1>
template<int S = 1>
VectorView< T, S *stride > sub ( const index_t start = 0,
const index_t stop = -1 )
inline

Create a sub vector (a view of a view)

Template Parameters
Sstride known at build time
Parameters
startStart index
stopStop index (first element after the view) By default it is the vector view length
Returns
the vector view

◆ sub() [2/2]

template<typename T, int stride = 1>
template<int S = 1>
const VectorView< T, S *stride > sub ( const index_t start = 0,
const index_t stop = -1 ) const
inline

Create a constant sub vector (a view of a view)

Template Parameters
Sstride known at build time
Parameters
startStart index
stopStop index (first element after the view) By default it is the vector view length
Returns
the vector view

◆ vector_op()

template<typename T, int stride = 1>
Vector const vector_op ( const index_t i) const
inline

Vector operation at index i

Parameters
iindex
Returns
Result of operation

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load

◆ vector_op_tail()

template<typename T, int stride = 1>
Vector const vector_op_tail ( const index_t i,
const vector_length_t remaining ) const
inline

Vector operation at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
Returns
Result of operation

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load

◆ vector_store()

template<typename T, int stride = 1>
void vector_store ( const index_t i,
const Vector val )
inline

Vector store at index i

Parameters
iindex
valVector value

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype

◆ vector_store_tail()

template<typename T, int stride = 1>
void vector_store_tail ( const index_t i,
const vector_length_t remaining,
const Vector val )
inline

Vector store at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
valVector value to write at index i with tail predication

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication

◆ arm_cmsis_dsp::VectorView< T, DYNAMIC >

struct arm_cmsis_dsp::VectorView< T, DYNAMIC >
template<typename T>
struct arm_cmsis_dsp::VectorView< T, DYNAMIC >

Vector view with dynamic stride (not known at build time)

Template Parameters
TType of the scalar

Public Types

using Vector = typename vector_traits<T>::vector
 Type of vectors for a vector architecture and for scalar datatype P.
 
using Vector
 Type of vectors for a vector architecture and for scalar datatype P.
 

Public Member Functions

vector_length_t compute_length (const index_t start, const index_t stop, const index_t stride) const
 Compute the number of elements in the vector view.
 
 VectorView (T *v, const index_t start, const index_t stop, const index_t stride)
 Create a vector view on a buffer.
 
 VectorView (const Vector_Base< T > &v, const index_t stride)
 Create a vector view on a vector.
 
 VectorView (const Vector_Base< T > &v, const index_t start, const index_t stop, const index_t stride)
 Create a vector view on a vector.
 
vector_length_t length () const
 Vector view dimension.
 
T * ptr () const
 Pointer to view storage.
 
T * ptr (const index_t i) const
 Pointer to view storage at index i.
 
const T * const_ptr () const
 Pointer to view constant storage.
 
const T * const_ptr (const index_t i) const
 Pointer to view constant storage at index i.
 
T & operator[] (index_t i)
 Element at index i.
 
T & operator[] (index_t i) const
 Element at index i.
 
void vector_store (index_t i, Vector val)
 Vector store at index i
 
void vector_store_tail (index_t i, vector_length_t remaining, Vector val)
 Vector store at index i with predicated tail
 
Vector const vector_op_tail (index_t i, vector_length_t remaining) const
 Vector operation at index i with predicated tail
 
Vector const vector_op (index_t i) const
 Vector operation at index i
 
 VectorView (const VectorView &other)
 Create a vector view from another view.
 
 VectorView (VectorView &&other)
 Move a vector view to another view.
 
template<typename Derived>
VectorViewoperator= (const _Expr< Derived > &other)
 Assign an expression to a vector view.
 
VectorViewoperator= (const T val)
 Assign a scalar to a vector view.
 
template<typename Derived>
VectorViewoperator+= (const _Expr< Derived > &other)
 Elementwise add an expression to a vector view.
 
VectorViewoperator+= (const VectorView &other)
 Elementwise add a vector view to a vector view.
 
VectorViewoperator+= (const T other)
 Elementwise add a scalar to a vector view.
 
template<typename Derived>
VectorViewoperator-= (const _Expr< Derived > &other)
 Elementwise subtract an expression to a vector view.
 
VectorViewoperator-= (const VectorView &other)
 Elementwise subtract a vector view to a vector view.
 
VectorViewoperator-= (const T other)
 Elementwise subtract a scalar to a vector view.
 
template<typename Derived>
VectorViewoperator*= (const _Expr< Derived > &other)
 Elementwise multiply an expression to a vector view.
 
VectorViewoperator*= (const VectorView &other)
 Elementwise multiply a vector view to a vector view.
 
VectorViewoperator*= (const T other)
 Elementwise multiply a scalar to a vector view.
 
index_t stride () const
 Stride of the vector view.
 
template<int S = 1>
VectorView< T, DYNAMICsub (const index_t start=0, const index_t stop=-1)
 Create a sub vector (a view of a view)
 
template<int S = 1>
const VectorView< T, DYNAMICsub (const index_t start=0, const index_t stop=-1) const
 Create a constant sub vector (a view of a view)
 
 VectorView (T *v, const vector_length_t start, const vector_length_t stop)
 Create a vector view on a buffer.
 
 VectorView (const Vector_Base< T > &v)
 Create a vector on a vector.
 
 VectorView (const Vector_Base< T > &v, const index_t start, const index_t stop)
 Create a vector view on vector.
 
 VectorView (const VectorView &other)
 Create a vector view from another view.
 
 VectorView (VectorView &&other)
 Move a vector view to another view.
 
vector_length_t length () const
 Vector view dimension.
 
T * ptr () const
 Pointer to view storage.
 
T * ptr (const index_t i) const
 Pointer to view storage at index i.
 
const T * const_ptr () const
 Pointer to view constant storage.
 
const T * const_ptr (const index_t i) const
 Pointer to view constant storage at index i.
 
T & operator[] (const index_t i)
 Element at index i.
 
T & operator[] (const index_t i) const
 Element at index i.
 
void vector_store (const index_t i, const Vector val)
 Vector store at index i
 
void vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val)
 Vector store at index i with predicated tail
 
Vector const vector_op_tail (const index_t i, const vector_length_t remaining) const
 Vector operation at index i with predicated tail
 
Vector const vector_op (const index_t i) const
 Vector operation at index i
 
VectorViewoperator= (const _Expr< Derived > &other)
 Assign an expression to a vector view.
 
VectorViewoperator= (const T val)
 Assign a scalar to a vector view.
 
VectorViewoperator+= (const _Expr< Derived > &other)
 Elementwise add an expression to a vector view.
 
VectorViewoperator+= (const VectorView &other)
 Elementwise add a vector view to a vector view.
 
VectorViewoperator+= (const T other)
 Elementwise add a scalar to a vector view.
 
VectorViewoperator-= (const _Expr< Derived > &other)
 Elementwise subtract an expression to a vector view.
 
VectorViewoperator-= (const VectorView &other)
 Elementwise subtract a vector view to a vector view.
 
VectorViewoperator-= (const T other)
 Elementwise subtract a scalar to a vector view.
 
VectorViewoperator*= (const _Expr< Derived > &other)
 Elementwise multiply an expression to a vector view.
 
VectorViewoperator*= (const VectorView &other)
 Elementwise multiply a vector view to a vector view.
 
VectorViewoperator*= (const T other)
 Elementwise multiply a scalar to a vector view.
 
VectorView< T, S *stridesub (const index_t start=0, const index_t stop=-1)
 Create a sub vector (a view of a view)
 
const VectorView< T, S *stridesub (const index_t start=0, const index_t stop=-1) const
 Create a constant sub vector (a view of a view)
 

Static Public Member Functions

static constexpr vector_length_t compute_length (const index_t start, const index_t stop)
 Compute the number of elements in the vector view.
 

Constructor & Destructor Documentation

◆ VectorView() [1/10]

template<typename T>
VectorView ( T * v,
const index_t start,
const index_t stop,
const index_t stride )
inlineexplicit

Create a vector view on a buffer.

Parameters
vBuffer of samples (not owned by the view)
startStart index of the view
stopStop index of the view (first element after the view)
strideStride (only known at runtime)

◆ VectorView() [2/10]

template<typename T>
VectorView ( const Vector_Base< T > & v,
const index_t stride )
inlineexplicit

Create a vector view on a vector.

Parameters
vVector owning the storage (not owned by the view)
strideStride (only known at runtime)

start is 0 stop is defined by the length of the vector

◆ VectorView() [3/10]

template<typename T>
VectorView ( const Vector_Base< T > & v,
const index_t start,
const index_t stop,
const index_t stride )
inlineexplicit

Create a vector view on a vector.

Parameters
vVector owning the storage (not owned by the view)
startStart index of the view
stopStop index
strideStride (only known at runtime)

◆ VectorView() [4/10]

template<typename T>
VectorView ( const VectorView< T, DYNAMIC > & other)
inline

Create a vector view from another view.

Parameters
otherthe other vector view

The new vector view will point to the same storage as the other vector view. No copy of element is occurring. To copy vector view content, the expr and copy operators are needed.

◆ VectorView() [5/10]

template<typename T>
VectorView ( VectorView< T, DYNAMIC > && other)
inline

Move a vector view to another view.

Parameters
otherthe other vector view

The new vector view will point to the same storage as the other vector view. No copy of element is occurring.

The other vector view is no more valid (points to null storage)

◆ VectorView() [6/10]

VectorView ( T * v,
const vector_length_t start,
const vector_length_t stop )
inlineexplicit

Create a vector view on a buffer.

Parameters
vBuffer of samples (not owned by the view)
startStart index of the view
stopStop index of the view (first element after the view)

◆ VectorView() [7/10]

VectorView ( const Vector_Base< T > & v)
inlineexplicit

Create a vector on a vector.

Parameters
vVector storage (not owned by the view)

◆ VectorView() [8/10]

VectorView ( const Vector_Base< T > & v,
const index_t start,
const index_t stop )
inlineexplicit

Create a vector view on vector.

Parameters
vVector storage (not owned by the view)
startStart index of the view
stopStop index of the view (first element after the view)

◆ VectorView() [9/10]

VectorView ( const VectorView< T, DYNAMIC > & other)
inline

Create a vector view from another view.

Parameters
otherthe other vector view

The new vector view will point to the same storage as the other vector view. No copy of element is occurring. To copy vector view content, the expr and copy operators are needed.

◆ VectorView() [10/10]

VectorView ( VectorView< T, DYNAMIC > && other)
inline

Move a vector view to another view.

Parameters
otherthe other vector view

The new vector view will point to the same storage as the other vector view. No copy of element is occurring.

The other vector view is no more valid (points to null storage)

Member Function Documentation

◆ compute_length() [1/2]

static constexpr vector_length_t compute_length ( const index_t start,
const index_t stop )
inlinestaticconstexpr

Compute the number of elements in the vector view.

Parameters
startVector view start index
stopVector view stop index (first element after the view)
Returns
Vector dimension

◆ compute_length() [2/2]

template<typename T>
vector_length_t compute_length ( const index_t start,
const index_t stop,
const index_t stride ) const
inline

Compute the number of elements in the vector view.

Parameters
startVector view start index
stopVector view stop index (first element after the view)
strideStride (only known at runtime)
Returns
Vector dimension

◆ const_ptr() [1/4]

const T * const_ptr ( ) const
inline

Pointer to view constant storage.

Returns
Pointer to start of constant storage

◆ const_ptr() [2/4]

template<typename T>
const T * const_ptr ( ) const
inline

Pointer to view constant storage.

Returns
Pointer to start of constant storage

◆ const_ptr() [3/4]

const T * const_ptr ( const index_t i) const
inline

Pointer to view constant storage at index i.

Parameters
iIndex
Returns
Pointer to constant storage at index i

The stride is used to compute this pointer. The index is scaled by the stride.

◆ const_ptr() [4/4]

template<typename T>
const T * const_ptr ( const index_t i) const
inline

Pointer to view constant storage at index i.

Parameters
iIndex
Returns
Pointer to constant storage at index i

The stride is used to compute this pointer. The index is scaled by the stride.

◆ length() [1/2]

vector_length_t length ( ) const
inline

Vector view dimension.

Returns
Number of elements

◆ length() [2/2]

template<typename T>
vector_length_t length ( ) const
inline

Vector view dimension.

Returns
Number of elements

◆ operator*=() [1/6]

VectorView & operator*= ( const _Expr< Derived > & other)
inline

Elementwise multiply an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator*=() [2/6]

template<typename T>
template<typename Derived>
VectorView & operator*= ( const _Expr< Derived > & other)
inline

Elementwise multiply an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator*=() [3/6]

VectorView & operator*= ( const T other)
inline

Elementwise multiply a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator*=() [4/6]

template<typename T>
VectorView & operator*= ( const T other)
inline

Elementwise multiply a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator*=() [5/6]

VectorView & operator*= ( const VectorView< T, DYNAMIC > & other)
inline

Elementwise multiply a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator*=() [6/6]

template<typename T>
VectorView & operator*= ( const VectorView< T, DYNAMIC > & other)
inline

Elementwise multiply a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator+=() [1/6]

VectorView & operator+= ( const _Expr< Derived > & other)
inline

Elementwise add an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator+=() [2/6]

template<typename T>
template<typename Derived>
VectorView & operator+= ( const _Expr< Derived > & other)
inline

Elementwise add an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator+=() [3/6]

VectorView & operator+= ( const T other)
inline

Elementwise add a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator+=() [4/6]

template<typename T>
VectorView & operator+= ( const T other)
inline

Elementwise add a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator+=() [5/6]

VectorView & operator+= ( const VectorView< T, DYNAMIC > & other)
inline

Elementwise add a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator+=() [6/6]

template<typename T>
VectorView & operator+= ( const VectorView< T, DYNAMIC > & other)
inline

Elementwise add a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator-=() [1/6]

VectorView & operator-= ( const _Expr< Derived > & other)
inline

Elementwise subtract an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator-=() [2/6]

template<typename T>
template<typename Derived>
VectorView & operator-= ( const _Expr< Derived > & other)
inline

Elementwise subtract an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

◆ operator-=() [3/6]

VectorView & operator-= ( const T other)
inline

Elementwise subtract a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator-=() [4/6]

template<typename T>
VectorView & operator-= ( const T other)
inline

Elementwise subtract a scalar to a vector view.

Parameters
otherthe scalar
Returns
the vector view

◆ operator-=() [5/6]

VectorView & operator-= ( const VectorView< T, DYNAMIC > & other)
inline

Elementwise subtract a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator-=() [6/6]

template<typename T>
VectorView & operator-= ( const VectorView< T, DYNAMIC > & other)
inline

Elementwise subtract a vector view to a vector view.

Parameters
otherthe vector view to add
Returns
the vector view

◆ operator=() [1/4]

VectorView & operator= ( const _Expr< Derived > & other)
inline

Assign an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

Evaluate an expression an assign its result to the vector view

◆ operator=() [2/4]

template<typename T>
template<typename Derived>
VectorView & operator= ( const _Expr< Derived > & other)
inline

Assign an expression to a vector view.

Template Parameters
Derivedthe datatype representing the abstract syntax tree of the view
Parameters
otherthe expression
Returns
the vector view

Evaluate an expression an assign its result to the vector view

◆ operator=() [3/4]

VectorView & operator= ( const T val)
inline

Assign a scalar to a vector view.

Parameters
valthe scalar
Returns
the vector view

◆ operator=() [4/4]

template<typename T>
VectorView & operator= ( const T val)
inline

Assign a scalar to a vector view.

Parameters
valthe scalar
Returns
the vector view

◆ operator[]() [1/4]

T & operator[] ( const index_t i)
inline

Element at index i.

Parameters
iIndex
Returns
Reference to element

The stride is used to compute this reference. The index is scaled by the stride.

◆ operator[]() [2/4]

T & operator[] ( const index_t i) const
inline

Element at index i.

Parameters
iIndex
Returns
Reference to element

The stride is used to compute this reference. The index is scaled by the stride.

◆ operator[]() [3/4]

template<typename T>
T & operator[] ( index_t i)
inline

Element at index i.

Parameters
iIndex
Returns
Reference to element

The stride is used to compute this reference. The index is scaled by the stride.

◆ operator[]() [4/4]

template<typename T>
T & operator[] ( index_t i) const
inline

Element at index i.

Parameters
iIndex
Returns
Reference to element

The stride is used to compute this reference. The index is scaled by the stride.

◆ ptr() [1/4]

T * ptr ( ) const
inline

Pointer to view storage.

Returns
Pointer to start of storage

◆ ptr() [2/4]

template<typename T>
T * ptr ( ) const
inline

Pointer to view storage.

Returns
Pointer to start of storage

◆ ptr() [3/4]

T * ptr ( const index_t i) const
inline

Pointer to view storage at index i.

Parameters
iIndex
Returns
Pointer to storage at index i

The stride is used to compute this pointer. The index is scaled by the stride.

◆ ptr() [4/4]

template<typename T>
T * ptr ( const index_t i) const
inline

Pointer to view storage at index i.

Parameters
iIndex
Returns
Pointer to storage at index i

The stride is used to compute this pointer. The index is scaled by the stride.

◆ stride()

template<typename T>
index_t stride ( ) const
inline

Stride of the vector view.

Returns
the stride

◆ sub() [1/4]

VectorView< T, S *stride > sub ( const index_t start = 0,
const index_t stop = -1 )
inline

Create a sub vector (a view of a view)

Template Parameters
Sstride known at build time
Parameters
startStart index
stopStop index (first element after the view) By default it is the vector view length
Returns
the vector view

◆ sub() [2/4]

template<typename T>
template<int S = 1>
VectorView< T, DYNAMIC > sub ( const index_t start = 0,
const index_t stop = -1 )
inline

Create a sub vector (a view of a view)

Template Parameters
Sstride known at build time
Parameters
startStart index
stopStop index (first element after the view) By default it is the vector view length
Returns
the vector view

◆ sub() [3/4]

const VectorView< T, S *stride > sub ( const index_t start = 0,
const index_t stop = -1 ) const
inline

Create a constant sub vector (a view of a view)

Template Parameters
Sstride known at build time
Parameters
startStart index
stopStop index (first element after the view) By default it is the vector view length
Returns
the vector view

◆ sub() [4/4]

template<typename T>
template<int S = 1>
const VectorView< T, DYNAMIC > sub ( const index_t start = 0,
const index_t stop = -1 ) const
inline

Create a constant sub vector (a view of a view)

Template Parameters
Sstride known at build time
Parameters
startStart index
stopStop index (first element after the view) By default it is the vector view length
Returns
the vector view

◆ vector_op() [1/2]

Vector const vector_op ( const index_t i) const
inline

Vector operation at index i

Parameters
iindex
Returns
Result of operation

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load

◆ vector_op() [2/2]

template<typename T>
Vector const vector_op ( index_t i) const
inline

Vector operation at index i

Parameters
iindex
Returns
Result of operation

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load

◆ vector_op_tail() [1/2]

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

Vector operation at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
Returns
Result of operation

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load

◆ vector_op_tail() [2/2]

template<typename T>
Vector const vector_op_tail ( index_t i,
vector_length_t remaining ) const
inline

Vector operation at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
Returns
Result of operation

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load

◆ vector_store() [1/2]

void vector_store ( const index_t i,
const Vector val )
inline

Vector store at index i

Parameters
iindex
valVector value

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype

◆ vector_store() [2/2]

template<typename T>
void vector_store ( index_t i,
Vector val )
inline

Vector store at index i

Parameters
iindex
valVector value

On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype

◆ vector_store_tail() [1/2]

void vector_store_tail ( const index_t i,
const vector_length_t remaining,
const Vector val )
inline

Vector store at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
valVector value to write at index i with tail predication

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication

◆ vector_store_tail() [2/2]

template<typename T>
void vector_store_tail ( index_t i,
vector_length_t remaining,
Vector val )
inline

Vector store at index i with predicated tail

Parameters
iindex
remainingNumber of remaining samples in the loop
valVector value to write at index i with tail predication

On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication

Macro Definition Documentation

◆ ARM_MATH_TYPES_F16_H

#define ARM_MATH_TYPES_F16_H

// endgroup bufferSizeTypes

◆ F16INFINITY [1/2]

#define F16INFINITY   ((float16_t)__builtin_inf())

16-bit floating-point type definition. This is already defined in arm_mve.h

defined(ARM_MATH_AUTOVECTORIZE)

This is not fully supported on ARM AC5.

◆ F16INFINITY [2/2]

#define F16INFINITY   ((float16_t)__builtin_inf())

16-bit floating-point type definition. This is already defined in arm_mve.h

This is not fully supported on ARM AC5.

◆ F64_MAX

#define F64_MAX   ((float64_t)DBL_MAX)

// endgroup generic

Function Documentation

◆ conjugate()

template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto conjugate ( const LHS & a)
inline

  • operator for expressions

Template Parameters
LHSLeft hand side datatype
Parameters
aLeft hand side expression tree
Returns
Expression representing the - vector

-vector (including matrix)

◆ copy()

template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto copy ( const LHS & a)
inline

Identity operator for expression.

Template Parameters
LHSLeft hand side datatype
Parameters
aLeft hand side expression tree
Returns
Expression representing the identity

Used to consider a vector view as an expression and force the copy of this vector view when assigned to another vector entity.

◆ expr()

template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto expr ( const LHS & a)
inline

Identity operator for expression.

Template Parameters
LHSLeft hand side datatype
Parameters
aLeft hand side expression tree
Returns
Expression representing the identity

Used to consider a vector view as an expression and force the copy of this vector view when assigned to another vector entity.

◆ operator*()

template<typename LHS, typename RHS, typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&compatible_element< LHS, RHS >() &&same_static_length< LHS, RHS >(), bool >::type = true>
auto operator* ( const LHS & a,
const RHS & b )
inline

Element wise multiplication operator for expressions.

Template Parameters
LHSLeft hand side datatype
RHSRight hand side datatype
Parameters
aLeft hand side expression tree
bRight hand side expression tree
Returns
Expression representing the *

elementwise vector * vector (including matrix)

◆ operator+() [1/2]

template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto operator+ ( const LHS & a)
inline

  • operator for expressions

Template Parameters
LHSLeft hand side datatype
Parameters
aLeft hand side expression tree
Returns
Expression representing + vector

+vector (including matrix)

◆ operator+() [2/2]

template<typename LHS, typename RHS, typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&compatible_element< LHS, RHS >() &&same_static_length< LHS, RHS >(), bool >::type = true>
auto operator+ ( const LHS & a,
const RHS & b )
inline

Addition operator for expressions.

Template Parameters
LHSLeft hand side datatype
RHSRight hand side datatype
Parameters
aLeft hand side expression tree
bRight hand side expression tree
Returns
Expression representing the add

vector + vector (including matrix)

◆ operator-() [1/2]

template<typename LHS, typename std::enable_if<!is_scalar< LHS >(), bool >::type = true>
auto operator- ( const LHS & a)
inline

  • operator for expressions

Template Parameters
LHSLeft hand side datatype
Parameters
aLeft hand side expression tree
Returns
Expression representing the - vector

-vector (including matrix)

◆ operator-() [2/2]

template<typename LHS, typename RHS, typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&compatible_element< LHS, RHS >() &&same_static_length< LHS, RHS >(), bool >::type = true>
auto operator- ( const LHS & a,
const RHS & b )
inline

Subtraction operator for expressions.

Template Parameters
LHSLeft hand side datatype
RHSRight hand side datatype
Parameters
aLeft hand side expression tree
bRight hand side expression tree
Returns
Expression representing the add

vector - vector (including matrix)