Skip to content

Commit 8de27aa

Browse files
committed
fix dot tests on Apple Silicon
1 parent c20895a commit 8de27aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/dot.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ using LoopVectorization, OffsetArrays
22
using Test
33

44
@testset "dot" begin
5+
dotunroll = LoopVectorization.register_count() == 32 ? 8 : 4
56
dotq = :(
67
for i eachindex(a, b)
78
s += a[i] * b[i]
89
end
910
)
1011
lsdot = LoopVectorization.loopset(dotq)
1112
@test LoopVectorization.choose_order(lsdot) ==
12-
(Symbol[:i], :i, Symbol("##undefined##"), :i, 4, -1)
13+
(Symbol[:i], :i, Symbol("##undefined##"), :i, dotunroll, -1)
1314
function mydot(a::AbstractVector, b::AbstractVector)
1415
s = zero(eltype(a))
1516
za = OffsetArray(a, OffsetArrays.Origin(0))

0 commit comments

Comments
 (0)