parallel.gpu.RandStream.create
Create independent random number streams on a GPU
Syntax
Description
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 name-value arguments to control the creation of the stream in
addition to the input arguments in the previous syntaxes. For example, to seed the random
number generator based on the current time, set gentype
,Name=Value
)Seed
to
"shuffle"
.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
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 ofparallel.gpu.RandStream.create
:Specify the same set of values for
gentype
,NumStreams
, andSeed
in each case.Specify a different value for
StreamIndices
that is between1
and theNumStreams
value in each case.
Version History
Introduced in R2011b