Open twesterhout opened 6 years ago
Yes, don't use anything from the detail
namespace unless you are prepared for the breakage from changes to Vc.
What you want is static_cast<__m128>(simd<float, sse>)
. I.e. every simd<T, Abi>
can be cast to/from implementation-defined types. In case of sse, avx, and avx512 in Vc, you can cast to the corresponding Intel intrinsics. The fixed_size
types can be cast to/from std::array<T, N>
.
Same as for simd
, you can simply static_cast
. Also note that Vc has an extension to P0214 with the member function to_bitset
and static member function from_bitset
.
about branch: master
Background
So my question is about "extending" Vc, i.e. wrapping some intrinsics into Vc functions. So, say, I have some C functions:
I have written something like this to wrap them:
Question 1
I'm concerned about the use of
Vc::detail::data
. Seeing as it's in thedetail
namespace, I'm probably not supposed to use it. But then what's the correct way to get the underlying vector that I can feed to an intrinsic?Question 2
And a related situation: consider an intrinsic that expects an
__mmask8
or an__mmask16
. How can I convertVc::simd_mask
to it?Thanks in advance!