Skip to content

Commit 92ad26e

Browse files
authored
Merge pull request #158 from JuliaGPU/tb/rm_mapidx
Remove mapidx.
2 parents 7470e90 + 0ed2ee3 commit 92ad26e

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

src/broadcast.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,3 @@ end
6767
# `fill!` in general for all `GPUDestArray` so we just go straight to the fallback
6868
@inline Base.copyto!(dest::GPUDestArray, bc::Broadcasted{<:Broadcast.AbstractArrayStyle{0}}) =
6969
copyto!(dest, convert(Broadcasted{Nothing}, bc))
70-
71-
# TODO: is this still necessary?
72-
function mapidx(f::F, A::GPUArray, args::NTuple{N, Any}) where {F,N}
73-
gpu_call(A, (f, A, args)) do state, f::F, A, args
74-
ilin = @linearidx(A, state)
75-
f(ilin, A, args...)
76-
end
77-
end

src/testsuite/base.jl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,6 @@ end
2828

2929
function test_base(AT)
3030
@testset "base functionality" begin
31-
@testset "mapidx" begin
32-
a = rand(ComplexF32, 77)
33-
b = rand(ComplexF32, 77)
34-
A = AT(a)
35-
B = AT(b)
36-
off = 1
37-
GPUArrays.mapidx(A, (B, off, length(A))) do i, a, b, off, len
38-
x = b[i]
39-
x2 = b[min(i+off, len)]
40-
a[i] = x * x2
41-
end
42-
foreach(1:length(a)) do i
43-
x = b[i]
44-
x2 = b[min(i+off, length(a))]
45-
a[i] = x * x2
46-
end
47-
@test Array(A) a
48-
end
49-
5031
@testset "copyto!" begin
5132
x = fill(0f0, (10, 10))
5233
y = rand(Float32, (20, 10))

0 commit comments

Comments
 (0)