simdpp::insert

From libsimdpp-docs
template< unsigned K, unsigned N, class E >
Ret<N> extract( const Vec1<N,E>& a, const El& el );

Inserts an element into K-th position in the given vector. The implementation behaves as if the following set of overloads is provided:

Ret Vec1 El
int8 int8 int8_t
uint8 uint8 uint8_t
int16 int16 int16_t
uint16 uint16 uint16_t
int32 int32 int32_t
uint32 uint32 uint32_t
int64 int64 int64_t
uint64 uint64 uint64_t
float32 float32 float
float64 float64 double

Parameters[edit]

a - vector to insert data to

{{par | el | the element to insert.

Return value[edit]

The resulting vector.

Equivalent operation[edit]

r0 = a0
...
r{K-1} = a{K-1}
rK = el
r{K+1} = a{K+1}
...

See also[edit]