Skip to content

Commit 69abc13

Browse files
committed
Fix a choose_order test and what was probably numerical problems in another.
1 parent 219bc05 commit 69abc13

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
1515
[compat]
1616
DocStringExtensions = "0.8"
1717
OffsetArrays = "1"
18-
SIMDPirates = "0.8.12"
18+
SIMDPirates = "0.8.15"
1919
SLEEFPirates = "0.5.4"
2020
UnPack = "0,1"
2121
VectorizationBase = "0.12.15"

test/miscellaneous.jl

+8-7
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,13 @@ using Test
144144
lsvar = LoopVectorization.LoopSet(varq);
145145
# LoopVectorization.choose_order(lsvar)
146146
# @test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, :i, :j, Unum, Tnum)
147-
@test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, Symbol("##undefined##"), :j, 4, -1)
148-
# if LoopVectorization.REGISTER_COUNT == 32
147+
if LoopVectorization.REGISTER_COUNT == 32
148+
@test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, Symbol("##undefined##"), :j, 4, -1)
149149
# @test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, :i, :j, 2, 10)
150-
# elseif LoopVectorization.REGISTER_COUNT == 16
150+
else#if LoopVectorization.REGISTER_COUNT == 16
151+
@test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, Symbol("##undefined##"), :j, 8, -1)
151152
# @test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, :i, :j, 2, 6)
152-
# end
153+
end
153154

154155
function myvar!(s², A, x̄)
155156
@.= 0
@@ -721,10 +722,10 @@ function findreducedparentfornonvecstore!(U::AbstractMatrix{T}, E1::AbstractVect
721722
U,E1
722723
end
723724

724-
ninereturns(x) = (0.25x, 0.5x, 0.75, 1.0x, 1.25x, 1.5x, 1.75x, 2.0x, 2.25x)
725+
@inline ninereturns(x) = (0.25x, 0.5x, 0.75, 1.0x, 1.25x, 1.5x, 1.75x, 2.0x, 2.25x)
725726
function manyreturntest(x)
726727
s = zero(eltype(x))
727-
for j eachindex(x)
728+
@fastmath for j eachindex(x)
728729
a, b, c, d, e, f, g, h, i = ninereturns(x[j])
729730
s += a * i + b * h + c * g - d
730731
end
@@ -943,7 +944,7 @@ end
943944
R .+= randn.(T); Rc = copy(R);
944945
@test maxavx!(R, Q, true) == max.(vec(maximum(Q, dims=(2,3))), Rc)
945946

946-
@test manyreturntest(R) manyreturntestavx(R)
947+
@test manyreturntest(Q) manyreturntestavx(Q)
947948

948949
U0 = randn(T, 5, 7); E0 = randn(T, 7);
949950
U1, E1 = splitintonoloop_reference(copy(U0), copy(E0));

0 commit comments

Comments
 (0)