1
2
3
4
5
6
7 package simd_test
8
9 import (
10 "simd/archsimd"
11 "testing"
12 )
13
14 func TestSqrt(t *testing.T) {
15 testFloat32x4Unary(t, archsimd.Float32x4.Sqrt, sqrtSlice[float32])
16 testFloat64x2Unary(t, archsimd.Float64x2.Sqrt, sqrtSlice[float64])
17 }
18
19 func TestRound(t *testing.T) {
20 testFloat32x4Unary(t, archsimd.Float32x4.Round, roundSlice[float32])
21 testFloat64x2Unary(t, archsimd.Float64x2.Round, roundSlice[float64])
22 }
23
24 func TestFloor(t *testing.T) {
25 testFloat32x4Unary(t, archsimd.Float32x4.Floor, floorSlice[float32])
26 testFloat64x2Unary(t, archsimd.Float64x2.Floor, floorSlice[float64])
27 }
28
29 func TestCeil(t *testing.T) {
30 testFloat32x4Unary(t, archsimd.Float32x4.Ceil, ceilSlice[float32])
31 testFloat64x2Unary(t, archsimd.Float64x2.Ceil, ceilSlice[float64])
32 }
33
34 func TestTrunc(t *testing.T) {
35 testFloat32x4Unary(t, archsimd.Float32x4.Trunc, truncSlice[float32])
36 testFloat64x2Unary(t, archsimd.Float64x2.Trunc, truncSlice[float64])
37 }
38
View as plain text