Function simd_aligned::packed_as_flat
source · pub fn packed_as_flat<T>(data: &[T]) -> &[T::Element]where
T: Simd + Default + Clone,
Expand description
Converts an slice of SIMD vectors into a flat slice of elements.
Example
#![feature(portable_simd)]
use std::simd::*;
use simd_aligned::*;
let packed = [f32x4::splat(0_f32); 4];
let flat = packed_as_flat(&packed);
assert_eq!(flat.len(), 16);