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