![]() |
AI Engine API User Guide
(AIE) 2021.2
|
AIE API provides operations to change the location of the elements within a vector and to combine the elements from two or more vectors.
Functions |
|
template<VectorVec> | |
auto | aie::filter_even(const Vec &v, unsigned step=1) ->vector< typename Vec::value_type, Vec::size()/2 > |
More... |
|
template<VectorVec> | |
auto | aie::filter_odd(const Vec &v, unsigned step=1) ->vector< typename Vec::value_type, Vec::size()/2 > |
More... |
|
template<VectorVec1,VectorVec2> | |
auto | aie::interleave_unzip(const Vec1 &v1, const Vec2 &v2, unsigned step) -> std::pair<aie_dm_resource_remove_t< Vec1 >,aie_dm_resource_remove_t< Vec1 >> |
More... |
|
template<VectorVec1,VectorVec2> | |
auto | aie::interleave_zip(const Vec1 &v1, const Vec2 &v2, unsigned step) -> std::pair<aie_dm_resource_remove_t< Vec1 >,aie_dm_resource_remove_t< Vec1 >> |
More... |
|
template<VectorVec> | |
auto | aie::reverse(const Vec &v) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<ElemE1,ElemE2,MaskM> | |
vector<operand_base_type_t< E1 >, M::size()> | aie::select(const E1 &a, const E2 &b, const M &m) |
More... |
|
template<VectorVec,ElemE,MaskM> | |
auto | aie::select(const Vec &v, E a, const M &m) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec1,VectorVec2,MaskM> | |
auto | aie::select(const Vec1 &v1, const Vec2 &v2, const M &m) ->aie_dm_resource_remove_t< Vec1 > |
More... |
|
template<ElemE,VectorVec,MaskM> | |
auto | aie::select(E a, const Vec &v, const M &m) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_down(const Vec &v, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_down_fill(const Vec &v, const Vec &fill, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_down_rotate(const Vec &v, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_up(const Vec &v, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_up_fill(const Vec &v, const Vec &fill, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_up_replicate(const Vec &v, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
template<VectorVec> | |
auto | aie::shuffle_up_rotate(const Vec &v, unsigned n) ->aie_dm_resource_remove_t< Vec > |
More... |
|
Returns a vector of half the size whose contents follow the following pattern.
v | Input vector. Must meetVector. |
step | Number of contiguous elements taken from the input vector. Must be a power of two. |
auto aie::interleave_unzip | ( | const Vec1 & | v1, |
const Vec2 & | v2, | ||
unsigned | step | ||
) | -> std::pair<aie_dm_resource_remove_t |
auto aie::interleave_zip | ( | const Vec1 & | v1, |
const Vec2 & | v2, | ||
unsigned | step | ||
) | -> std::pair<aie_dm_resource_remove_t |
Picks elements alternatively from the input vectors and writes them sequentially into the output vectors.
auto aie::reverse | ( | const Vec & | v | ) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but in reverse order.
v | Input vector. The type must meetVector. |
vector<operand_base_type_t |
( | const E1 & | a, |
const E2 & | b, | ||
const M & | m | ||
) |
Combines the values of the input vector and value into a vector of the same size by using a mask that specifies which is the source input for each element of the output vector.
auto aie::select | ( | const Vec & | v, |
E | a, | ||
const M & | m | ||
) | ->aie_dm_resource_remove_t |
Combines the values of the input vector and value into a vector of the same size by using a mask that specifies which is the source input for each element of the output vector.
auto aie::select | ( | const Vec1 & | v1, |
const Vec2 & | v2, | ||
const M & | m | ||
) | ->aie_dm_resource_remove_t |
Combines the values of the two input vectors into a vector of the same size by using a mask that specifies which is the source input for each element of the output vector.
auto aie::select | ( | E | a, |
const Vec & | v, | ||
const M & | m | ||
) | ->aie_dm_resource_remove_t |
Combines the values of the input value and vector into a vector of the same size by using a mask that specifies which is the source input for each element of the output vector.
auto aie::shuffle_down | ( | const Vec & | v, |
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted down by n. Elements do not wrap around and new elements are undefined.
v | Input vector. The type must meetVector. |
n | Distance for the elements to be shifted. |
auto aie::shuffle_down_fill | ( | const Vec & | v, |
const Vec & | fill, | ||
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted down by n. Elements do not wrap around and new elements are filled from a second vector.
v | Input vector. The type must meetVector. |
fill | Second input vector used to fill the elements in the upper part of the output vector. |
n | Distance for the elements to be shifted. |
auto aie::shuffle_down_rotate | ( | const Vec & | v, |
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted down by n (elements wrap around):
v | Input vector. The type must meetVector. |
n | Distance for the elements to be shifted. |
auto aie::shuffle_up | ( | const Vec & | v, |
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted up by n. Elements do not wrap around and new elements are undefined.
v | Input vector. The type must meetVector. |
n | Distance for the elements to be shifted. |
auto aie::shuffle_up_fill | ( | const Vec & | v, |
const Vec & | fill, | ||
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted up by n. Elements do not wrap around and new elements are filled from a second vector.
v | Input vector. The type must meetVector. |
fill | Second input vector used to fill the elements in the lower part of the output vector. |
n | Distance for the elements to be shifted. |
auto aie::shuffle_up_replicate | ( | const Vec & | v, |
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted up by n. Elements do not wrap around and new elements are copies of the first element of the input vector.
v | Input vector. The type must meetVector. |
n | Distance for the elements to be shifted. |
auto aie::shuffle_up_rotate | ( | const Vec & | v, |
unsigned | n | ||
) | ->aie_dm_resource_remove_t |
Returns a vector whose contents are the same as the input vector, but shifted up by n (elements wrap around):
v | Input vector. The type must meetVector. |
n | Distance for the elements to be shifted. |