Skip to content

vec. Add two vector blend / permute

Add following method

  - @c CxxUtils::vblend<mask> (VEC& dst, const VEC& src1,const VEC& src2)
 *                          Fills dst with permutation of src1 and src2
 *                          according to mask.
 *                          Mask is a list of integers that specifies the elements
 *                          that should be extracted and returned in src1 and src2.
 *                          An index i in the interval [0,N) indicates that element number i 
 *                          from the first input vector should be placed in the
 *                          corresponding position in the result vector.  
 *                          An index in the interval [N,2N)
 *                          indicates that the element number i-N
 *                          from the second input vector should be placed 
 *                          in the corresponding position in the result vector.

(it is an extension of permute but can permute/mix/blend 2 input vectors) and relevant test

When we have GCC , Clang vector types we use the relevant intrinsics.

Edited by Christos Anastopoulos

Merge request reports

Loading