Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Commit f989092

Browse files
authored
Merge pull request #7 from FluxML/fbot/deps
Fix deprecations
2 parents d2b1519 + 9503d73 commit f989092

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/array.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ end
4444

4545
# Interop with CPU array
4646

47-
function Base.copy!{T}(dst::CuArray{T}, src::DenseArray{T})
47+
function Base.copy!(dst::CuArray{T}, src::DenseArray{T}) where T
4848
@assert length(dst) == length(src)
4949
Mem.upload(dst.ptr, pointer(src), length(src) * sizeof(T))
5050
return dst
5151
end
5252

53-
function Base.copy!{T}(dst::DenseArray{T}, src::CuArray{T})
53+
function Base.copy!(dst::DenseArray{T}, src::CuArray{T}) where T
5454
@assert length(dst) == length(src)
5555
Mem.download(pointer(dst), src.ptr, length(src) * sizeof(T))
5656
return dst
5757
end
5858

59-
function Base.copy!{T}(dst::CuArray{T}, src::CuArray{T})
59+
function Base.copy!(dst::CuArray{T}, src::CuArray{T}) where T
6060
@assert length(dst) == length(src)
6161
Mem.transfer(dst.ptr, src.ptr, length(src) * sizeof(T))
6262
return dst

src/indexing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function _getindex(xs::CuArray{T}, i::Integer) where T
1616
return x[1]
1717
end
1818

19-
function Base.getindex{T}(xs::CuArray{T}, i::Integer)
19+
function Base.getindex(xs::CuArray{T}, i::Integer) where T
2020
assertslow("getindex")
2121
_getindex(xs, i)
2222
end
@@ -28,7 +28,7 @@ function _setindex!(xs::CuArray{T}, v::T, i::Integer) where T
2828
return x[1]
2929
end
3030

31-
function Base.setindex!{T}(xs::CuArray{T}, v::T, i::Integer)
31+
function Base.setindex!(xs::CuArray{T}, v::T, i::Integer) where T
3232
assertslow("setindex!")
3333
_setindex!(xs, v, i)
3434
end

0 commit comments

Comments
 (0)