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

Commit

Permalink
Merge pull request #7 from FluxML/fbot/deps
Browse files Browse the repository at this point in the history
Fix deprecations
  • Loading branch information
MikeInnes committed Aug 28, 2017
2 parents d2b1519 + 9503d73 commit f989092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ end

# Interop with CPU array

function Base.copy!{T}(dst::CuArray{T}, src::DenseArray{T})
function Base.copy!(dst::CuArray{T}, src::DenseArray{T}) where T
@assert length(dst) == length(src)
Mem.upload(dst.ptr, pointer(src), length(src) * sizeof(T))
return dst
end

function Base.copy!{T}(dst::DenseArray{T}, src::CuArray{T})
function Base.copy!(dst::DenseArray{T}, src::CuArray{T}) where T
@assert length(dst) == length(src)
Mem.download(pointer(dst), src.ptr, length(src) * sizeof(T))
return dst
end

function Base.copy!{T}(dst::CuArray{T}, src::CuArray{T})
function Base.copy!(dst::CuArray{T}, src::CuArray{T}) where T
@assert length(dst) == length(src)
Mem.transfer(dst.ptr, src.ptr, length(src) * sizeof(T))
return dst
Expand Down
4 changes: 2 additions & 2 deletions src/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function _getindex(xs::CuArray{T}, i::Integer) where T
return x[1]
end

function Base.getindex{T}(xs::CuArray{T}, i::Integer)
function Base.getindex(xs::CuArray{T}, i::Integer) where T
assertslow("getindex")
_getindex(xs, i)
end
Expand All @@ -28,7 +28,7 @@ function _setindex!(xs::CuArray{T}, v::T, i::Integer) where T
return x[1]
end

function Base.setindex!{T}(xs::CuArray{T}, v::T, i::Integer)
function Base.setindex!(xs::CuArray{T}, v::T, i::Integer) where T
assertslow("setindex!")
_setindex!(xs, v, i)
end
Expand Down

0 comments on commit f989092

Please sign in to comment.