mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-22 05:24:48 +00:00
16 lines
301 B
Rust
16 lines
301 B
Rust
#![cfg(not(miri))] // Miri does not support all SIMD intrinsics
|
|
|
|
use core::simd::f32x4;
|
|
|
|
#[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));
|
|
}
|