Skip to content

Commit 56ab6e0

Browse files
Minor oversight: binary operator associativity
1 parent b49b01f commit 56ab6e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vmapreduce.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ vvminimum(A; dims=:, init=typemax) = vvmapreduce(identity, min, init, A, dims)
233233
quote
234234
ξ = $initsym(Base.promote_op($opsym, Base.promote_op(f, $T), Int))
235235
@turbo for i eachindex(A)
236-
ξ = $opsym(f(A[i]), ξ)
236+
ξ = $opsym(ξ, f(A[i]))
237237
end
238238
return ξ
239239
end
@@ -753,7 +753,7 @@ vtminimum(A; dims=:, init=typemax) = vtmapreduce(identity, min, init, A, dims)
753753
quote
754754
ξ = $initsym(Base.promote_op($opsym, Base.promote_op(f, $T), Int))
755755
@tturbo for i eachindex(A)
756-
ξ = $opsym(f(A[i]), ξ)
756+
ξ = $opsym(ξ, f(A[i]))
757757
end
758758
return ξ
759759
end

0 commit comments

Comments
 (0)