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

Commit

Permalink
fix ambiguity for Random.seed!(rng, nothing)
Browse files Browse the repository at this point in the history
  • Loading branch information
marius311 committed May 11, 2020
1 parent 6a5c584 commit 43c1248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rand/random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function Random.seed!(rng::RNG, seed=Base.rand(UInt64), offset=0)
return
end

Random.seed!(rng::RNG, ::Nothing) = Random.seed!(rng)

# convenience function that seeds both generators
function seed!(seed=Base.rand(UInt64))
Random.seed!(generator(), seed)
Expand Down
1 change: 1 addition & 0 deletions test/rand.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using CuArrays.CURAND

rng = CURAND.generator()
Random.seed!(rng)
Random.seed!(rng, nothing)
Random.seed!(rng, 1)
Random.seed!(rng, 1, 0)

Expand Down

0 comments on commit 43c1248

Please sign in to comment.