Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Foster authored and andyferris committed Apr 5, 2017
1 parent 16fa766 commit 8d3ec32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mapreduce.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@inline _first(a1, as...) = a1

################
## map / map! ##
################

# The following type signature for map() matches any list of AbstractArrays,
# provided at least one is a static array.
@inline function map(f, as::Union{SA,AbstractArray}...) where {SA<:StaticArray}
_map(f, same_size(as...), as...)
end
Expand All @@ -16,7 +20,7 @@ end
newT = :(Core.Inference.return_type(f, Tuple{$(eltypes...)}))
return quote
@_inline_meta
@inbounds return similar_type(typeof(_first_static(a...)), $newT, Size(S))(tuple($(exprs...)))
@inbounds return similar_type(typeof(_first(a...)), $newT, Size(S))(tuple($(exprs...)))
end
end

Expand Down

0 comments on commit 8d3ec32

Please sign in to comment.