rust/library/core/tests/simd.rs
2022-07-20 18:08:20 -07:00

15 lines
263 B
Rust

use core::simd::f32x4;
use core::simd::SimdFloat;
#[test]
fn testing() {
let x = f32x4::from_array([1.0, 1.0, 1.0, 1.0]);
let y = -x;
let h = x * f32x4::splat(0.5);
let r = y.abs();
assert_eq!(x, r);
assert_eq!(h, f32x4::splat(0.5));
}