Skip to content

Commit 0f974c7

Browse files
committed
include random
1 parent fc5f754 commit 0f974c7

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/GPUArrays.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ include("vectors.jl")
1717
include("convolution.jl")
1818
include("testsuite/testsuite.jl")
1919
include("jlbackend.jl")
20+
include("random.jl")
2021

2122
export GPUArray, gpu_call, thread_blocks_heuristic, global_size
2223
export linear_index, @linearidx, @cartesianidx, convolution!

src/abstract_gpu_interface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ end
3232
"""
3333
Blocks until all operations are finished on `A`
3434
"""
35-
function synchronize(A::GPUArray)
35+
function synchronize(A::AbstractArray)
3636
# fallback is a noop, for backends not needing synchronization. This
3737
# makes it easier to write generic code that also works for AbstractArrays
3838
end
3939
"""
4040
Gets the device associated to the Array `A`
4141
"""
42-
function device(A::GPUArray)
42+
function device(A::AbstractArray)
4343
# fallback is a noop, for backends not needing synchronization. This
4444
# makes it easier to write generic code that also works for AbstractArrays
4545
end

src/devices.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ is_cudanative(ctx) = false
7676
is_julia(ctx) = false
7777
is_opengl(ctx) = false
7878

79-
supports_double(ctx) = false
79+
supports_double(ctx) = false
8080

8181

8282

src/random.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ function rand!(A::GPUArray{T}) where T <: AbstractFloat
5757
A
5858
end
5959

60-
rand{T <: GPUArray, ET}(::Type{T}, ::Type{ET}, size...) = rand(T, ET, size)
6160
rand(X::Type{<: GPUArray{T, N}}, size::NTuple{N, Integer}) where {T, N} = rand(A, T, size)
62-
function rand(X::Type{<: GPUArray}, ::Type{ET}, size...) where ET
61+
62+
function rand(X::Type{<: GPUArray}, ::Type{ET}, size::Integer...) where ET
6363
A = similar(X, ET, size)
6464
rand!(A)
6565
end

0 commit comments

Comments
 (0)