![]() |
AI Engine API User Guide
(AIE) 2021.2
|
Implementation of the vector data type
T | Type of the elements contained in the vector. |
Elems | Number of elements in the vector. |
#include
Public Types |
|
using | native_type=native_vector_type_t< T, Elems > |
using | value_type= T |
Public Member Functions |
|
vector() | |
More... |
|
vector(constnative_type&v) | |
More... |
|
vector(constvector_storage_t< T, Elems > &v) | |
More... |
|
template |
|
vector(value_typev, Values &&... values) | |
More... |
|
template |
|
auto | cast_to() const |
More... |
|
constexprvector_elem_const_ref<value_type, Elems > | elem_const_ref(unsigned idx) const |
More... |
|
constexprvector_elem_ref<value_type, Elems > | elem_ref(unsigned idx) |
More... |
|
constexprvector_elem_const_ref<value_type, Elems > | elem_ref(unsigned idx) const |
More... |
|
template |
|
vector<value_type, ElemsOut > | extract(unsigned idx) const |
More... |
|
value_type | get(unsigned idx) const |
More... |
|
template |
|
constexprvector< T, ElemsOut > | grow(unsigned idx=0) const |
More... |
|
template |
|
vector<value_type, ElemsOut > | grow_extract(unsigned idx) const |
template |
|
constexprvector< T, ElemsOut > | grow_replicate() const |
More... |
|
template |
|
vector& | insert(unsigned idx, constvector< T, ElemsIn > &v) |
More... |
|
template |
|
vector& | insert(unsigned idx, typenamevector< T, ElemsIn >::native_typev) |
More... |
|
template<aie_dm_resourceResource, typename T2 > | |
void | load(const T2 *ptr) |
More... |
|
template<aie_dm_resourceResource, typename T2 > | |
void | load_unaligned(const T2 *ptr, unsigned aligned_elems) |
More... |
|
operator native_type() const | |
More... |
|
constexprvector_elem_ref<value_type, Elems > | operator[](unsigned idx) |
More... |
|
constexprvector_elem_const_ref<value_type, Elems > | operator[](unsigned idx) const |
More... |
|
template |
|
vector< T2, Elems > | pack() const |
More... |
|
vector& | push(value_typev) |
More... |
|
template |
|
constexprvector_ref<value_type, RefElems, Elems > | ref(unsigned off=0) |
void | set(value_typev, unsigned idx) |
More... |
|
template |
|
auto | split() const |
More... |
|
template<aie_dm_resourceResource, typename T2 > | |
void | store(T2 *ptr) const |
More... |
|
template<aie_dm_resourceResource, typename T2 > | |
void | store_unaligned(T2 *ptr, unsigned aligned_elems) const |
More... |
|
auto | to_native() const |
vector<int16, Elems > | unpack() const |
More... |
|
template |
|
vector& | upd_all(SubVectors &&...subvectors) |
More... |
|
Static Public Member Functions |
|
static constexpr unsigned | bits() |
More... |
|
static constexpr bool | is_complex() |
More... |
|
static constexpr bool | is_floating_point() |
More... |
|
static constexpr bool | is_integral() |
More... |
|
static constexpr bool | is_real() |
More... |
|
static constexpr bool | is_signed() |
More... |
|
static constexpr unsigned | size() |
More... |
|
Friends |
|
template |
|
class | vector |
More... |
|
|
inline |
Default constructor. The value of the elements is undefined.
|
inline |
Construct from internal native types.
v | Data used to construct the vector from. |
|
inline |
Construct from internal types. This is a special case for 1024b internal vector types, which need to be broken into two 512b vectors
v | Data used to construct the vector from |
|
inlineexplicit |
Construct from a list of values
v | First value in the list |
values | Rest of values in the list |
|
inlinestaticconstexpr |
Returns the total size of the vector in bits.
Reinterprets the current vector as a vector of the given type. The number of elements is automatically computed by the function
DstT | Type the vector will be cast to |
|
inlineconstexpr |
Returns a constant reference object to the element on the given index.
idx | Index of the element. |
|
inlineconstexpr |
Returns a reference object to the element on the given index.
idx | Index of the element. |
|
inlineconstexpr |
Returns a constant reference object to the element on the given index.
idx | Index of the element. |
|
inline |
Returns a subvector with the contents of a region of the vector.
ElemsOut | Size of the returned subvector. |
idx | Index of the subvector to be returned. |
|
inline |
Returns the value of the element on the given index.
idx | Index of the element. |
|
inlineconstexpr |
Returns a copy of the current vector in a larger vector. The value of the new elements is undefined.
ElemsOut | Size of the output vector. |
idx | Location of the subvector within the output vector |
|
inlineconstexpr |
Returns a copy of the current vector in a larger vector. The contents of the vector are replicated as many times as required to fill the output vector
ElemsOut | Size of the output vector. |
|
inline |
Updates the contents of a region of the vector using the values in the given subvector and returns a reference to the updated vector.
idx | Index of the subvector to be replaced. |
v | Subvector to be written into the region. |
|
inline |
Updates the contents of a region of the vector using the values in the given native subvector and returns a reference to the updated vector.
idx | Index of the subvector to be replaced. |
v | Native subvector to be written into the region. |
|
inlinestaticconstexpr |
Returns a bool that says whether the element type is a complex number.
|
inlinestaticconstexpr |
Returns a bool that says whether the element type is floating-point.
|
inlinestaticconstexpr |
Returns a bool that says whether the element type is an integer.
|
inlinestaticconstexpr |
Returns a bool that says whether the element type is a real number.
|
inlinestaticconstexpr |
Returns a bool that says whether the element type is signed.
|
inline |
Replaces the contents of the vector with the values pointed by the given memory address. Address is assumed to meet the alignment requirements for vector loads (>= 32 bytes).
ptr | Pointer to the location of the values in memory. |
|
inline |
Replaces the contents of the vector with the values pointed by the given memory address. Address is assumed to be aligned to the given amount of elements.
ptr | Pointer to the location of the values in memory. |
aligned_elems | Number of elements ptr is aligned to. |
|
inline |
Operator for conversion to the native type
|
inlineconstexpr |
Returns a reference object to the element on the given index.
idx | Index of the element. |
|
inlineconstexpr |
Returns a constant reference object to the element on the given index.
idx | Index of the element. |
Converts the current vector of 16b elements into a vector of 8b elements.
|
inline |
Shifts all elements in the vector up and writes the given value into the first position of the vector (the element in the last position of the vector is lost).
v | Value to be written into the first position of the vector |
|
inline |
Updates the value of the element on the given index.
v | Value to write. |
idx | Index of the element whose value is updated. |
|
inlinestaticconstexpr |
Returns the number of elements in the vector.
Returns the contents of the current vector stored in a std::tuple of subvectors.
ElemsOut | Size of each subvector. |
|
inline |
Writes the contents of the vector into the given memory address. Address is assumed to meet the alignment requirements for vector stores (>= 32 bytes).
ptr | Pointer to the location where the vector contents must be written in memory. |
|
inline |
Writes the contents of the vector into the given memory address. Address is assumed to be aligned to the given amount of elements.
ptr | Pointer to the location where the vector contents must be written in memory. |
aligned_elems | Number of elements ptr is aligned to. |
|
inline |
Converts the current vector of 8b elements into a vector of 16b elements.
|
inline |
Updates the contents of the vector using the values in the given subvectors. Subvectors must be of the same type and size.
subvectors | List of subvectors. |
Type for vector registers. The documentation of this class and its members can be found atdetail::vector.
T | Type of the elements contained in the vector. It must meetElemBaseType. |
Elems | Number of elements in the vector. |