Function core::core_simd::swizzle_dyn::transize
source · unsafe fn transize<T, const N: usize>(
f: unsafe fn(_: T, _: T) -> T,
bytes: Simd<u8, N>,
idxs: Simd<u8, N>
) -> Simd<u8, N>where
LaneCount<N>: SupportedLaneCount,
🔬This is a nightly-only experimental API. (
portable_simd
#86656)Expand description
This sets up a call to an architecture-specific function, and in doing so it persuades rustc that everything is the correct size. Which it is. This would not be needed if one could convince Rust that, by matching on N, N is that value, and thus it would be valid to substitute e.g. 16.
Safety
The correctness of this function hinges on the sizes agreeing in actuality.