File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ struct RNG <: AbstractRNG
67
67
end
68
68
69
69
# return an instance of GPUArrays.RNG suitable for the requested array type
70
- default_rng (:: Type{<:AbstractGPUArray } ) = error (" Not implemented" ) # COV_EXCL_LINE
70
+ default_rng (:: Type{<:AnyGPUArray } ) = error (" Not implemented" ) # COV_EXCL_LINE
71
71
72
72
make_seed (rng:: RNG ) = make_seed (rng, rand (UInt))
73
73
function make_seed (rng:: RNG , n:: Integer )
@@ -81,7 +81,7 @@ function Random.seed!(rng::RNG, seed::Vector{UInt32})
81
81
return
82
82
end
83
83
84
- function Random. rand! (rng:: RNG , A:: AbstractGPUArray {T} ) where T <: Number
84
+ function Random. rand! (rng:: RNG , A:: AnyGPUArray {T} ) where T <: Number
85
85
gpu_call (A, rng. state) do ctx, a, randstates
86
86
idx = linear_index (ctx)
87
87
idx > length (a) && return
@@ -91,7 +91,7 @@ function Random.rand!(rng::RNG, A::AbstractGPUArray{T}) where T <: Number
91
91
A
92
92
end
93
93
94
- function Random. randn! (rng:: RNG , A:: AbstractGPUArray {T} ) where T <: Number
94
+ function Random. randn! (rng:: RNG , A:: AnyGPUArray {T} ) where T <: Number
95
95
threads = (length (A) - 1 ) ÷ 2 + 1
96
96
length (A) == 0 && return
97
97
gpu_call (A, rng. state; total_threads = threads) do ctx, a, randstates
You can’t perform that action at this time.
0 commit comments