masked loads?
Kay F. Jahnke
[please enable javascript to see the address]
Thu Jul 21 18:54:51 CEST 2016
Am 19.07.2016 um 10:10 schrieb Matthias Kretz:
> Vector<T> x = {};
> x(mask) = Vector<T>(mem);
>
> i.e. initialize a null vector object. Then do a masked assignment from an
> unmasked load. This is not as efficient as _mm_maskload_ps (unless the
> compiler does the optimization).
If mem points to ordinary memory which contains less than
Vector<T>::Size T, is it guaranteed to be safe to construct a Vector<T>
from mem? I would have assumed that the construction would access
Vector<T>::Size T and therefore might access memory it's not supposed to
see, and so produce a memory fault.
float mem[3] ;
...
Vc::Vector<float> x (mem) ; // is this safe?
I want the masked load to load from ordinary memory, not Vc::Memory,
which is padded and where the unmasked load will certainly work.
With regards
Kay
More information about the Vc
mailing list