mattkretz / wg21-papers

my papers to WG21 — the C++ committee
5 stars 7 forks source link

Mask casting is currently too cumbersome #64

Closed mattkretz closed 1 year ago

mattkretz commented 7 years ago

Currently fixed_size_simd_mask can implicitly convert between each other. There's split and concat as well as to_fixed_size, to_compatible, and to_native. There's no static_cast equivalent. That means to go from native_simd_mask<int> to native_simd_mask<uint> (which is a noop) you have to go via fixed_size_simd_mask<int, N> (which is nasty and involved conversion code).

There must be either a cast function or more implicit casts must be allowed.