summaryrefslogtreecommitdiffstats
path: root/library/core/tests/simd.rs
blob: 565c8975eb94feb8dede274f55d457fb02aed6b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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));
}