Main Content

parallel.gpu.RandStream.list

R2026b

List random number generator algorithms on the GPU

Description

parallel.gpu.RandStream.list displays a list of all available generator algorithms that can be used when creating a random number stream with parallel.gpu.RandStream or parallel.gpu.RandStream.create.

T = parallel.gpu.RandStream.list returns a table of all available generator algorithms that can be used to create a random number stream with parallel.gpu.RandStream or parallel.gpu.RandStream.create. (since R2026b)

example

Examples

collapse all

Since R2026b

To return a table of all available GPU generator algorithms, use parallel.gpu.RandStream.list with an assigned output argument.

T = parallel.gpu.RandStream.list
T =

  3×3 table

                            Name          MultiStream                  Description
                       _______________    ___________    ________________________________________

    mrg32k3a           "combRecursive"       true        "Combined multiple recursive generator"
    philox4x32_10      "philox"              true        "Philox 4x32 generator with 10 rounds"
    threefry4x64_20    "threefry"            true        "Threefry 4x64 generator with 20 rounds"

Create three independent random number streams using the generator algorithm in the second row of the table.

generator = T.Name(2);
[s1,s2,s3] = parallel.gpu.RandStream.create(generator,NumStreams=3)
s1 = 
philox4x32_10 random stream on the GPU
      StreamIndex: 1
       NumStreams: 3
             Seed: 0
  NormalTransform: BoxMuller

s2 = 
philox4x32_10 random stream on the GPU
      StreamIndex: 2
       NumStreams: 3
             Seed: 0
  NormalTransform: BoxMuller

s3 = 
philox4x32_10 random stream on the GPU
      StreamIndex: 3
       NumStreams: 3
             Seed: 0
  NormalTransform: BoxMuller

Output Arguments

collapse all

Table of all available GPU generator algorithms. Each row of the table describes a generator algorithm, including the generator name, multiple-stream support, and description, in the table variables "Name", "MultiStream", and "Description".

For more information about the differences between generating random numbers on the GPU and CPU, see Control Random Number Generation Across GPU and CPU.

Extended Capabilities

expand all

Version History

Introduced in R2011b

expand all