Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/host/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function Base.map(f, xs::AnyGPUArray...)
return map!(f, dest, xs...)
end

function Base.map!(f, dest::AnyGPUArray, xs::AnyGPUArray...)
function Base.map!(f, dest::AnyGPUArray, xs::AbstractArray...)
# custom broadcast, ignoring the container size mismatches
# (avoids the reshape + view that our mapreduce impl has to do)
indices = LinearIndices.((dest, xs...))
Expand Down
3 changes: 3 additions & 0 deletions test/testsuite/broadcasting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ function broadcasting(AT, eltypes)
@test compare(AT, rand(ET, 2,2), rand(ET, 2)) do x,y
map!(+, x, y)
end
@test compare(AT, rand(ET, 2), 1:2) do x, y
map!(+, x, y)
end
end

@testset "map $ET" begin
Expand Down
Loading