Skip to content

Commit 0485343

Browse files
committed
Remove some target overrides.
1 parent 5a83d5b commit 0485343

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/host/base.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ end
6262
function Base.repeat(a::AbstractGPUVecOrMat, m::Int, n::Int = 1)
6363
o, p = size(a, 1), size(a, 2)
6464
b = similar(a, o*m, p*n)
65-
gpu_call(b, a, o, p, m, n; target=a, total_threads=n) do ctx, b, a, o, p, m, n
65+
gpu_call(b, a, o, p, m, n; total_threads=n) do ctx, b, a, o, p, m, n
6666
j = linear_index(ctx)
6767
j > n && return
6868
d = (j - 1) * p + 1
@@ -82,7 +82,7 @@ end
8282
function Base.repeat(a::AbstractGPUVector, m::Int)
8383
o = length(a)
8484
b = similar(a, o*m)
85-
gpu_call(b, a, o, m; target=a, total_threads=m) do ctx, b, a, o, m
85+
gpu_call(b, a, o, m; total_threads=m) do ctx, b, a, o, m
8686
i = linear_index(ctx)
8787
i > m && return
8888
c = (i - 1)*o + 1

src/host/random.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function global_rng(A::AbstractGPUArray)
7777
end
7878

7979
function Random.rand!(rng::RNG, A::AbstractGPUArray{T}) where T <: Number
80-
gpu_call(rng.state, A; target=A) do ctx, randstates, a
80+
gpu_call(A, rng.state) do ctx, a, randstates
8181
idx = linear_index(ctx)
8282
idx > length(a) && return
8383
@inbounds a[idx] = gpu_rand(T, ctx, randstates)

test/testsuite/base.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function cartesian_iter(state, A, res, Asize)
1+
function cartesian_iter(state, res, A, Asize)
22
for i in CartesianIndices(Asize)
33
idx = GPUArrays.gpu_sub2ind(Asize, i.I)
44
res[idx] = A[idx]
@@ -119,7 +119,7 @@ function test_base(AT)
119119
Ac = rand(Float32, 32, 32)
120120
A = AT(Ac)
121121
result = fill!(copy(A), 0.0)
122-
gpu_call(cartesian_iter, A, result, size(A); target=result)
122+
gpu_call(cartesian_iter, result, A, size(A))
123123
Array(result) == Ac
124124
end
125125

0 commit comments

Comments
 (0)