Create independent random number streams on a GPU
creates a single random number stream that uses the random number generator algorithm
specified by s
= parallel.gpu.RandStream.create('gentype'
)'gentype'
.
Note
The parallel.gpu.RandStream
object creation function is a more concise
alternative when you want to create a single stream.
[s1,s2,...] = parallel.gpu.RandStream.create(
creates 'gentype'
,'NumStreams',n)n
random number streams that use the random number generator
algorithm specified by 'gentype'
. The streams are independent in a
pseudorandom sense. The streams are not necessarily independent from streams created at
other times.
[___] = parallel.gpu.RandStream.create(
also specifies additional 'gentype'
,Name,Value
)Name,Value
pairs to control the creation of the
stream, including the number of independent streams to create.
If you create multiple streams by calling
parallel.gpu.RandStream.create
several times, the streams are not
necessarily independent of each other. To create independent streams from separate calls
of parallel.gpu.RandStream.create
:
Specify the same set of values for gentype
,
'NumStreams'
, and 'Seed'
in each
case.
Specify a different value for 'StreamIndices'
that is between
1
and the 'NumStreams'
value in each
case.
gpurng
| parallel.gpu.RandStream
| parallel.gpu.RandStream.getGlobalStream
| parallel.gpu.RandStream.list
| parallel.gpu.RandStream.setGlobalStream