Skip to content

Commit 4c5e34e

Browse files
authored
Force more inlining of reduce (#987)
* Force more inlining in `reduce` * bump version
1 parent 697ba0b commit 4c5e34e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "StaticArrays"
22
uuid = "90137ffa-7385-5640-81b9-e52037218182"
3-
version = "1.3.1"
3+
version = "1.3.2"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/mapreduce.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ end
192192
## reduce ##
193193
############
194194

195-
@inline reduce(op, a::StaticArray; dims = :, init = _InitialValue()) =
195+
@inline reduce(op::R, a::StaticArray; dims = :, init = _InitialValue()) where {R} =
196196
_reduce(op, a, dims, init)
197197

198198
# disambiguation
@@ -206,7 +206,7 @@ reduce(::typeof(hcat), A::StaticArray{<:Tuple,<:AbstractVecOrMat}) =
206206
reduce(::typeof(hcat), A::StaticArray{<:Tuple,<:StaticVecOrMatLike}) =
207207
_reduce(hcat, A, :, _InitialValue())
208208

209-
@inline _reduce(op, a::StaticArray, dims, init = _InitialValue()) =
209+
@inline _reduce(op::R, a::StaticArray, dims, init = _InitialValue()) where {R} =
210210
_mapreduce(identity, op, dims, init, Size(a), a)
211211

212212
################

0 commit comments

Comments
 (0)