We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 261939b commit 6612783Copy full SHA for 6612783
src/mapreduce.jl
@@ -92,7 +92,7 @@ end
92
93
# These are all similar in Base but not @inline'd
94
@inline sum{T}(a::StaticArray{T}) = reduce(+, zero(T), a)
95
-@inline prod{T}(a::StaticArray{T}) = reduce(+, zero(T), a)
+@inline prod{T}(a::StaticArray{T}) = reduce(*, zero(T), a)
96
@inline count(a::StaticArray{Bool}) = reduce(+, 0, a)
97
@inline all(a::StaticArray{Bool}) = reduce(&, true, a) # non-branching versions
98
@inline any(a::StaticArray{Bool}) = reduce(|, false, a) # (benchmarking needed)
0 commit comments