OverviewΒΆ

The normal sequence of generating random numbers using NVPL RAND is as follows:

  1. Create a new generator of the desired type (see Generator Types).

  2. Set the generator options (see Generator Options).

  3. Allocate memory for the output array, and generate random numbers with nvplRandGenerate() or another generation function (see Generation Functions).

  4. Use the results.

  5. If desired, generate more random numbers with more calls to generation functions.

  6. Clean up with nvplRandDestroyGenerator().

It is legal to create several generators at the same time. Each generator encapsulates a separate state and is independent of all other generators. The sequence of numbers produced by each generator is deterministic. Given the same set-up parameters, the same sequence will be generated with every run of the program.