AI Engine API User Guide (AIE) 2021.2
Initialization

Overview

Operations to initialize vectors and accumulators.

Functions

template<ElemE, unsigned Elems = native_vector_length_v>
vector<operand_base_type_t< E >, Elems > aie::broadcast(E a)
More...
template<AccumAcc, Accum... Accums>
auto aie::concat(const Acc &acc, const Accums &...accums) ->accum< typename Acc::value_type, Acc::size() *(1+sizeof...(Accums))>
More...
template<VectorVec, Vector... Vectors>
auto aie::concat(const Vec &v, const Vectors &...vectors) ->vector< typename Vec::value_type, Vec::size() *(1+sizeof...(Vectors))>
More...
template<ElemBaseTypeT, unsigned Elems = native_vector_length_v>
vector< T, Elems > aie::zeros()
More...

Function Documentation

broadcast()

template< ElemE, unsigned Elems = native_vector_length_v>
vector<operand_base_type_t, Elems> aie::broadcast ( E a )

Returns a vector whose elements are initialized to the given value.

for( unsignedi = 0; i < Elems; ++i)
out[i] = a;
Template Parameters
E. Element type of the returned vector.
Elems. Size of the vector.
Parameters
a Value. The type must meetElem.

concat()[1/2]

template< AccumAcc, Accum... Accums>
auto aie::concat ( const Acc & acc,
const Accums &... accums
) ->accum

Concatenate the contents of all input accumulators into a larger accumulator. All input accumulators must have the same type and size.

Parameters
acc First input accumulator.
accums Rest of input accumulators.

concat()[2/2]

template< VectorVec, Vector... Vectors>
auto aie::concat ( const Vec & v,
const Vectors &... vectors
) ->vector

Concatenate the contents of all input vectors into a larger vector. All input vectors must have the same type and size.

Parameters
v First input vector.
vectors Rest of input vectors.

zeros()

template< ElemBaseTypeT, unsigned Elems = native_vector_length_v>
vector aie::zeros ( )

Returns a vector whose elements are initialized to zero.

for( unsignedi = 0; i < Elems; ++i)
out[i] = 0;
Template Parameters
E. Element type of the returned vector.
Elems. Size of the vector.