Skip to content

Commit 9a58e21

Browse files
committed
test hopefully pass on non-AVX2 CPUs
1 parent b0134c7 commit 9a58e21

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/special.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,12 @@
441441
@test vpow!(r1, x, Val(0.75)) (r2 .= x .^ 0.75)
442442
@test vpow!(r1, x, Val(2/3)) (r2 .= x .^ (2/3))
443443
vpow!(r1, x, Val(0.5)); r2 .= sqrt.(x)
444-
for i eachindex(x)
445-
@test r1[i] r2[i] rtol = eps(r1[i])
444+
if Bool(!LoopVectorization.VectorizationBase.has_feature(Val(:x86_64_avx2)))
445+
for i eachindex(x)
446+
@test abs(r1[i] - r2[i]) eps(r1[i])
447+
end
448+
else
449+
@test r1 == r2
446450
end
447451
@test vpow!(r1, x, Val(1/4)) (r2 .= x .^ (1/4))
448452
@test vpow!(r1, x, Val(4.5)) (r2 .= x .^ 4.5)

0 commit comments

Comments
 (0)