Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/mapreduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@

# 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...)
if VERSION < v"0.7.0-"
@inline function map(f, as::Union{SA,AbstractArray}...) where {SA<:StaticArray}
_map(f, same_size(as...), as...)
end
else
@inline function map(f, a1::StaticArray, as::AbstractArray...)
_map(f, same_size(a1, as...), a1, as...)
end
end

@generated function _map(f, ::Size{S}, a::AbstractArray...) where {S}
Expand Down