Data Structures | |
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... | |
Functions | |
template<typename LHS , typename RHS , typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&SameElementType< LHS, RHS >::value &&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) |
| |
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 >()) &&SameElementType< LHS, RHS >::value &&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) |
| |
template<typename LHS , typename RHS , typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&SameElementType< LHS, RHS >::value &&same_static_length< LHS, RHS >(), bool >::type = true> | |
auto | operator* (const LHS &a, const RHS &b) |
Element wise multiplication operator for expressions. | |
struct arm_cmsis_dsp::Vector_Base |
Storage for a vector.
P | Type 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 | |
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 | |
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 | |
|
inline |
Iterator begin.
|
inline |
Pointer to storage buffer.
|
inline |
Pointer to storage buffer at index i.
i | Index in buffer |
|
inline |
Iterator end.
|
inline |
|
inline |
Element at index i.
i | index |
|
inline |
Element at index i.
i | index |
|
inline |
Pointer to storage buffer.
|
inline |
Pointer to storage buffer at index i.
i | Index in buffer |
Vector operation at index i
i | index |
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
|
inline |
Vector operation at index i with predicated tail
i | index |
remaining | Number of remaining samples in the loop |
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 at index i
T | scalar datatype |
i | index |
val | Vector 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
|
inline |
Vector store at index i with predicated tail
i | index |
remaining | Number of remaining samples in the loop |
val | Vector 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
struct arm_cmsis_dsp::Vector |
Vector template for size knonw at build time.
P | Type of the scalar |
L | Vector length in number of elements. Negative if length not known at build time. It is the default value |
Allocator | Memory allocator to use. By default it is the macro TMP_ALLOC |
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 > | |
Vector & | operator= (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> | |
Vector & | operator= (const T other) |
Fill a vector with a constant. | |
template<typename Derived > | |
Vector & | operator+= (const _Expr< Derived > &other) |
Elementwise add the result of an expression to a vector. | |
Vector & | operator+= (const Vector &other) |
Elementwise add vector to another vector. | |
Vector & | operator+= (const P other) |
Elementwise add a constant to a vector. | |
template<typename Derived > | |
Vector & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract the result of an expression from a vector. | |
Vector & | operator-= (const Vector &other) |
Elementwise subtract a vector from a vector. | |
Vector & | operator-= (const P other) |
Elementwise subtract a constant from a vector. | |
template<typename Derived > | |
Vector & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply the result of an expression with a vector. | |
Vector & | operator*= (const Vector &other) |
Elementwise multiply a vector with a vector. | |
Vector & | operator*= (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 | |
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 | |
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. | |
|
inline |
Construct a new vector.
The length is known at build time.
|
inlineexplicit |
Construct a new vector and initialize it.
The length is known at build time.
init_val | Initialization value |
|
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.
l | Initialization list |
Create a vector from a vector using a different memory allocator.
other | Other vector using a different memory allocator |
|
inlineexplicit |
Create a vector from a VectorView.
S | The stride of the vector view known at build time |
other | The vector view |
Create a vector from an expression.
Derived | The type representing the abstract syntax tree |
other | The expression |
It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop
|
inlinestatic |
Allocate a buffer for this vector using the memory allocator.
Elementwise multiply the result of an expression with a vector.
Derived | The type representing the abstract syntax tree of the expression |
other | The expression |
|
inline |
Elementwise multiply a constant with a vector.
Derived | Constant datatype |
other | The constant |
Elementwise multiply a vector with a vector.
other | The othr vector |
Elementwise add the result of an expression to a vector.
Derived | The type representing the abstract syntax tree of the expression |
other | The expression |
|
inline |
Elementwise add a constant to a vector.
P | The constant datatype |
other | The expression |
Elementwise add vector to another vector.
other | The vector |
Elementwise subtract the result of an expression from a vector.
Derived | The type representing the abstract syntax tree of the expression |
other | The expression |
|
inline |
Elementwise subtract a constant from a vector.
P | Datatype of the constant |
other | The constant |
Elementwise subtract a vector from a vector.
other | The other vector |
Copy result of an expression to a vector content.
Derived | The type representing the abstract syntax tree |
other | The expression |
It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop
|
inline |
Fill a vector with a constant.
T | The constant datatype |
other | The const |
|
inline |
Create a vector view.
S | Stride known at build time |
start | Start index for the vector view |
stop | Stop index for the vector view (first element after the vector view) Default is length of the vector if known at build time. |
struct arm_cmsis_dsp::Vector< P, DYNAMIC, Allocator > |
Vector template for dynamic vector (size known at runtime)
P | Type of the scalar |
Allocator | Memory allocator to use. By default it is the macro TMP_ALLOC |
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 > | |
Vector & | operator= (const _Expr< Derived > &other) |
Fill a vector with an expression. | |
template<typename T , typename std::enable_if< is_scalar< T >(), bool >::type = true> | |
Vector & | operator= (const T other) |
Fill a vector with a scalar. | |
template<typename Derived > | |
Vector & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector. | |
Vector & | operator+= (const Vector &other) |
Elementwise add a vector to a vector. | |
Vector & | operator+= (const P other) |
Elementwise add a scalar to a vector. | |
template<typename Derived > | |
Vector & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector. | |
Vector & | operator-= (const Vector &other) |
Elementwise subtract a vector to a vector. | |
Vector & | operator-= (const P other) |
Elementwise subtract a scalar to a vector. | |
template<typename Derived > | |
Vector & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression with a vector. | |
Vector & | operator*= (const Vector &other) |
Elementwise multiply a vector with a vector. | |
Vector & | operator*= (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. | |
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 | |
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 | |
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. | |
Additional Inherited Members | |
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. | |
|
inlineexplicit |
Create a new vector.
length | Vector dimension |
init_val | Initialization value |
|
inlineexplicit |
Create a new vector.
length | Vector dimension |
|
inlineexplicit |
Create a new vector.
l | Initializer list A vector can be initialized like an array using {} syntax |
Create a new vector from a vector using a different memory allocator.
K | Dimension of other vector (statically known or dynamic) |
other | The vector to copy |
Create a new vector from a vector of same type.
other | The vector to copy |
|
inlineexplicit |
Create a new vector from a vector view.
S | Stride of vector view known at build time |
other | The vector to copy |
Create a new vector from an expressipn.
Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
|
inlinestatic |
Allocate a buffer for this vector using the memory allocator.
length | Vector dimension |
Elementwise multiply an expression with a vector.
Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
|
inline |
Elementwise multiply a scalar with a vector.
P | Scalar datatype |
other | The scalar |
Elementwise multiply a vector with a vector.
other | The vector to add |
Elementwise add an expression to a vector.
Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
|
inline |
Elementwise add a scalar to a vector.
P | Scalar datatype |
other | The scalar |
Elementwise add a vector to a vector.
other | The vector to add |
Elementwise subtract an expression to a vector.
Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
|
inline |
Elementwise subtract a scalar to a vector.
P | Scalar datatype |
other | The scalar |
Elementwise subtract a vector to a vector.
other | The vector to add |
Fill a vector with an expression.
Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
|
inline |
Fill a vector with a scalar.
T | Scalar datatype |
other | The scalar |
|
inline |
Create a vector view.
S | stride |
start | Start index of view |
stop | Stop index of view (first index after end of view) By default it is the length of the vector. |
struct arm_cmsis_dsp::VectorView |
Vector view.
T | Type of the scalar |
S | Stride 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 > | |
VectorView & | operator= (const _Expr< Derived > &other) |
Assign an expression to a vector view. | |
VectorView & | operator= (const T val) |
Assign a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector view. | |
VectorView & | operator+= (const VectorView &other) |
Elementwise add a vector view to a vector view. | |
VectorView & | operator+= (const T other) |
Elementwise add a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector view. | |
VectorView & | operator-= (const VectorView &other) |
Elementwise subtract a vector view to a vector view. | |
VectorView & | operator-= (const T other) |
Elementwise subtract a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression to a vector view. | |
VectorView & | operator*= (const VectorView &other) |
Elementwise multiply a vector view to a vector view. | |
VectorView & | operator*= (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. | |
|
inlineexplicit |
Create a vector view on a buffer.
v | Buffer of samples (not owned by the view) |
start | Start index of the view |
stop | Stop index of the view (first elemnt after the view) |
|
inlineexplicit |
Create a vector on a vector.
v | Vector storage (not owned by the view) |
|
inlineexplicit |
Create a vector view on vector.
v | Vector storage (not owned by the view) |
start | Start index of the view |
stop | Stop index of the view (first elemnt after the view) |
|
inline |
Create a vector view from another view.
other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring. To copy vector view content, the expr and copy operators are needed.
|
inline |
Move a vector view to another view.
other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring.
The other vector view is no more valid (points to null storage)
|
inlinestaticconstexpr |
|
inline |
Pointer to view constant storage.
|
inline |
Pointer to view constant storage at index i.
i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
|
inline |
Vector view dimension.
|
inline |
Elementwise multiply an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
|
inline |
Elementwise multiply a scalar to a vector view.
other | the scalar |
|
inline |
Elementwise multiply a vector view to a vector view.
other | the vector view to add |
|
inline |
Elementwise add an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
|
inline |
Elementwise add a scalar to a vector view.
other | the scalar |
|
inline |
Elementwise add a vector view to a vector view.
other | the vector view to add |
|
inline |
Elementwise subtract an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
|
inline |
Elementwise subtract a scalar to a vector view.
other | the scalar |
|
inline |
Elementwise subtract a vector view to a vector view.
other | the vector view to add |
|
inline |
Assign an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
Evaluate an expression an assign its result to the vector view
|
inline |
Assign a scalar to a vector view.
val | the scalar |
|
inline |
Element at index i.
i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
|
inline |
Element at index i.
i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
|
inline |
Pointer to view storage.
|
inline |
Pointer to view storage at index i.
i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
|
inline |
Create a sub vector (a view of a view)
S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
|
inline |
Create a constant sub vector (a view of a view)
S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
Vector operation at index i
i | index |
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
|
inline |
Vector operation at index i with predicated tail
i | index |
remaining | Number of remaining samples in the loop |
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 at index i
i | index |
val | Vector 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
|
inline |
Vector store at index i with predicated tail
i | index |
remaining | Number of remaining samples in the loop |
val | Vector 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
struct arm_cmsis_dsp::VectorView< T, DYNAMIC > |
Vector view with dynamic stride (not known at build time)
T | Type of the scalar |
Public Types | |
using | Vector = typename vector_traits< T >::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 > | |
VectorView & | operator= (const _Expr< Derived > &other) |
Assign an expression to a vector view. | |
VectorView & | operator= (const T val) |
Assign a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector view. | |
VectorView & | operator+= (const VectorView &other) |
Elementwise add a vector view to a vector view. | |
VectorView & | operator+= (const T other) |
Elementwise add a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector view. | |
VectorView & | operator-= (const VectorView &other) |
Elementwise subtract a vector view to a vector view. | |
VectorView & | operator-= (const T other) |
Elementwise subtract a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression to a vector view. | |
VectorView & | operator*= (const VectorView &other) |
Elementwise multiply a vector view to a vector view. | |
VectorView & | operator*= (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, DYNAMIC > | 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, DYNAMIC > | sub (const index_t start=0, const index_t stop=-1) const |
Create a constant sub vector (a view of a view) | |
|
inlineexplicit |
Create a vector view on a buffer.
v | Buffer of samples (not owned by the view) |
start | Start index of the view |
stop | Stop index of the view (first elemnt after the view) |
stride | Stride (only known at runtime) |
|
inlineexplicit |
Create a vector view on a vector.
v | Vector owning the storage (not owned by the view) |
stride | Stride (only known at runtime) |
start is 0 stop is defined by the length of the vector
|
inlineexplicit |
Create a vector view on a vector.
v | Vector owning the storage (not owned by the view) |
start | Start index of the view |
stop | Stop index |
stride | Stride (only known at runtime) |
|
inline |
Create a vector view from another view.
other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring. To copy vector view content, the expr and copy operators are needed.
|
inline |
Move a vector view to another view.
other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring.
The other vector view is no more valid (points to null storage)
|
inline |
|
inline |
Pointer to view constant storage.
|
inline |
Pointer to view constant storage at index i.
i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
|
inline |
Vector view dimension.
|
inline |
Elementwise multiply an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
|
inline |
Elementwise multiply a scalar to a vector view.
other | the scalar |
|
inline |
Elementwise multiply a vector view to a vector view.
other | the vector view to add |
|
inline |
Elementwise add an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
|
inline |
Elementwise add a scalar to a vector view.
other | the scalar |
|
inline |
Elementwise add a vector view to a vector view.
other | the vector view to add |
|
inline |
Elementwise subtract an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
|
inline |
Elementwise subtract a scalar to a vector view.
other | the scalar |
|
inline |
Elementwise subtract a vector view to a vector view.
other | the vector view to add |
|
inline |
Assign an expression to a vector view.
Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
Evaluate an expression an assign its result to the vector view
|
inline |
Assign a scalar to a vector view.
val | the scalar |
|
inline |
Element at index i.
i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
|
inline |
Element at index i.
i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
|
inline |
Pointer to view storage.
|
inline |
Pointer to view storage at index i.
i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
|
inline |
Stride of the vector view.
|
inline |
Create a sub vector (a view of a view)
S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
|
inline |
Create a constant sub vector (a view of a view)
S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
Vector operation at index i
i | index |
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
|
inline |
Vector operation at index i with predicated tail
i | index |
remaining | Number of remaining samples in the loop |
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 at index i
i | index |
val | Vector 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
|
inline |
Vector store at index i with predicated tail
i | index |
remaining | Number of remaining samples in the loop |
val | Vector 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
|
inline |
Identity operator for expression.
LHS | Left hand side datatype |
a | Left hand side expression tree |
Used to consider a vector view as an expression and force the copy of this vector view when assigned to another vector entity.
|
inline |
Identity operator for expression.
LHS | Left hand side datatype |
a | Left hand side expression tree |
Used to consider a vector view as an expression and force the copy of this vector view when assigned to another vector entity.
|
inline |
Element wise multiplication operator for expressions.
LHS | Left hand side datatype |
RHS | Right hand side datatype |
a | Left hand side expression tree |
b | Right hand side expression tree |
elementwise vector * vector (including matrix)
|
inline |
LHS | Left hand side datatype |
a | Left hand side expression tree |
+vector (including matrix)
|
inline |
Addition operator for expressions.
LHS | Left hand side datatype |
RHS | Right hand side datatype |
a | Left hand side expression tree |
b | Right hand side expression tree |
vector + vector (including matrix)
|
inline |
LHS | Left hand side datatype |
a | Left hand side expression tree |
-vector (including matrix)
|
inline |
Subtraction operator for expressions.
LHS | Left hand side datatype |
RHS | Right hand side datatype |
a | Left hand side expression tree |
b | Right hand side expression tree |
vector - vector (including matrix)