]> git.lizzy.rs Git - rust.git/blob - library/core/tests/simd.rs
Rollup merge of #106407 - mejrs:attr_check, r=compiler-errors
[rust.git] / library / core / tests / simd.rs
1 use core::simd::f32x4;
2 use core::simd::SimdFloat;
3
4 #[test]
5 fn testing() {
6     let x = f32x4::from_array([1.0, 1.0, 1.0, 1.0]);
7     let y = -x;
8
9     let h = x * f32x4::splat(0.5);
10
11     let r = y.abs();
12     assert_eq!(x, r);
13     assert_eq!(h, f32x4::splat(0.5));
14 }