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 16fa766 commit 8d3ec32Copy full SHA for 8d3ec32
src/mapreduce.jl
@@ -1,7 +1,11 @@
1
+@inline _first(a1, as...) = a1
2
+
3
################
4
## map / map! ##
5
6
7
+# The following type signature for map() matches any list of AbstractArrays,
8
+# provided at least one is a static array.
9
@inline function map(f, as::Union{SA,AbstractArray}...) where {SA<:StaticArray}
10
_map(f, same_size(as...), as...)
11
end
@@ -16,7 +20,7 @@ end
16
20
newT = :(Core.Inference.return_type(f, Tuple{$(eltypes...)}))
17
21
return quote
18
22
@_inline_meta
19
- @inbounds return similar_type(typeof(_first_static(a...)), $newT, Size(S))(tuple($(exprs...)))
23
+ @inbounds return similar_type(typeof(_first(a...)), $newT, Size(S))(tuple($(exprs...)))
24
25
26
0 commit comments