Skip to content

Commit

Permalink
test hopefully pass on non-AVX2 CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Aug 31, 2021
1 parent b0134c7 commit 9a58e21
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/special.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a58e21

Please sign in to comment.