From 9a58e2183b7b27a92e98ba2f8e29260ed80d4204 Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Tue, 31 Aug 2021 15:14:57 -0400 Subject: [PATCH] test hopefully pass on non-AVX2 CPUs --- test/special.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/special.jl b/test/special.jl index fda9eb14f..e3db33c08 100644 --- a/test/special.jl +++ b/test/special.jl @@ -441,8 +441,12 @@ @test vpow!(r1, x, Val(0.75)) ≈ (r2 .= x .^ 0.75) @test vpow!(r1, x, Val(2/3)) ≈ (r2 .= x .^ (2/3)) vpow!(r1, x, Val(0.5)); r2 .= sqrt.(x) - for i ∈ eachindex(x) - @test r1[i] ≈ r2[i] rtol = eps(r1[i]) + if Bool(!LoopVectorization.VectorizationBase.has_feature(Val(:x86_64_avx2))) + for i ∈ eachindex(x) + @test abs(r1[i] - r2[i]) ≤ eps(r1[i]) + end + else + @test r1 == r2 end @test vpow!(r1, x, Val(1/4)) ≈ (r2 .= x .^ (1/4)) @test vpow!(r1, x, Val(4.5)) ≈ (r2 .= x .^ 4.5)