In an altivec optimised function I'm writing I want to mask out some of the bytes read. To generate the mask vector I was going to use: mask = vec_sld(vec_splat_u8(-1), vec_splat_u8(0), 16 - remains); but it turns out that you have to use a literal as the last parameter to vec_sld(). If anyone can suggest a method to efficiently generate a vector with the first x bytes set to 0xff and the others set to 0x00 then it would help me a lot.
Fri, 2016-09-23 12:39#1
Generating a mask vector (altivec)