@@ -144,12 +144,13 @@ using Test
144
144
lsvar = LoopVectorization. LoopSet (varq);
145
145
# LoopVectorization.choose_order(lsvar)
146
146
# @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 )
149
149
# @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 )
151
152
# @test LoopVectorization.choose_order(lsvar) == (Symbol[:j,:i], :j, :i, :j, 2, 6)
152
- # end
153
+ end
153
154
154
155
function myvar! (s², A, x̄)
155
156
@. s² = 0
@@ -721,10 +722,10 @@ function findreducedparentfornonvecstore!(U::AbstractMatrix{T}, E1::AbstractVect
721
722
U,E1
722
723
end
723
724
724
- ninereturns (x) = (0.25 x, 0.5 x, 0.75 , 1.0 x, 1.25 x, 1.5 x, 1.75 x, 2.0 x, 2.25 x)
725
+ @inline ninereturns (x) = (0.25 x, 0.5 x, 0.75 , 1.0 x, 1.25 x, 1.5 x, 1.75 x, 2.0 x, 2.25 x)
725
726
function manyreturntest (x)
726
727
s = zero (eltype (x))
727
- for j ∈ eachindex (x)
728
+ @fastmath for j ∈ eachindex (x)
728
729
a, b, c, d, e, f, g, h, i = ninereturns (x[j])
729
730
s += a * i + b * h + c * g - d
730
731
end
943
944
R .+ = randn .(T); Rc = copy (R);
944
945
@test maxavx! (R, Q, true ) == max .(vec (maximum (Q, dims= (2 ,3 ))), Rc)
945
946
946
- @test manyreturntest (R ) ≈ manyreturntestavx (R )
947
+ @test manyreturntest (Q ) ≈ manyreturntestavx (Q )
947
948
948
949
U0 = randn (T, 5 , 7 ); E0 = randn (T, 7 );
949
950
U1, E1 = splitintonoloop_reference (copy (U0), copy (E0));
0 commit comments