This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] implement <experimental/simd> simd_mask<> and operators.
Needs ReviewPublic

Authored by timshen on Jan 4 2018, 4:55 PM.

Details

Summary

simd_mask<T, Abi> stores a simd<U, Abi>, where U has the same length of T, but is an unsigned integer. Then all functionality of simd_mask<T, Abi> can be implemented in terms of simd<U, Abi>.

For reference, Vc seems to store an int as a bitset. This results into inefficient code: