]> git.lizzy.rs Git - rust.git/blob - crates/core_simd/src/vectors_f32.rs
Merge pull request #49 from rust-lang/feature/const-generics
[rust.git] / crates / core_simd / src / vectors_f32.rs
1 #![allow(non_camel_case_types)]
2
3 /// A SIMD vector of containing `LANES` `f32` values.
4 #[repr(simd)]
5 pub struct SimdF32<const LANES: usize>([f32; LANES]);
6
7 impl_float_vector! { SimdF32, f32, SimdU32 }
8
9 /// Vector of two `f32` values
10 pub type f32x2 = SimdF32<2>;
11
12 /// Vector of four `f32` values
13 pub type f32x4 = SimdF32<4>;
14
15 /// Vector of eight `f32` values
16 pub type f32x8 = SimdF32<8>;
17
18 /// Vector of 16 `f32` values
19 pub type f32x16 = SimdF32<16>;
20
21 from_transmute_x86! { unsafe f32x4 => __m128 }
22 from_transmute_x86! { unsafe f32x8 => __m256 }
23 //from_transmute_x86! { unsafe f32x16 => __m512 }