3 ms·
> And there is no primitive for masking on AVX2, those are only available on AVX-256. Sure there is a masking MOV in the original AVX (thus including AVX2), VM
by vardump 6y ago
> And there is no primitive for masking on AVX2, those are only available on AVX-256.
Sure there is a masking MOV in the original AVX (thus including AVX2), VMASKMOV. Works for both masked loads and stores.
https://www.felixcloutier.com/x86/vmaskmov https://www.felixcloutier.com/x86/vmaskmov
Notably: "Faults occur only due to mask-bit required memory accesses that caused the faults. Faults will not occur due to referencing any memory location if the corresponding mask bit for that memory location is 0. For example, no faults will be detected if the mask bits are all zero."
A nitpick: there's no such thing as AVX-256, you probably meant AVX-512.
- _old_dude_ 6y agoThanks, i've overlooked that var mask = VectorMask.fromLong(SPECIES, 0b0111_1111); var i = 0; var upperBound = length - length % 15; for(; i < upperBound; i += 15) { v1.intoArray(result, i); v2.intoArray(result, i + 8, mask); ...