Changes to SPRNG 2.0

How is version 2.0 different?

  1. SPRNG provides both FORTRAN and C (also C++) interfaces for the use of

  2. the parallel random number generators.  The new version has all the
    generators in one library.The objective of the new version is to combine the current random number generators (RNGs) into a single library so that a user can use all of them in a single program at a same time.
  3.  The user now is able to and needs to specify the type of RNG when a random number stream is initialized. We add one integer argument rng_type to the front of the argument list of the function init_sprng.

  4. int *init_sprng(int rng_type, int stream_number, int nstreams, int seed, int rng_parameter)
    SPRNG_POINTER init_sprng(integer rng_type, integer streamnum, integer nstreams, integer seed, integer param)

     User can sprcify one of the follows for rng_type:

  5. The following macros are added to sprng.h and sprng_f.h:

  6.         #define SPRNG_LFG       0
            #define SPRNG_LCG       1
            #define SPRNG_LCG64     2
            #define SPRNG_CMRG      3
            #define SPRNG_MLFG      4
            #define SPRNG_PMLCG     5

  7.  For simple interface, a user can only have one random number stream at one time since he doesn't specify stream ID.  The default generator is "SPRNG_LFG".

  8. User still can change RNG at runtime by calling init_sprng:

     int *init_sprng(int rng_type, int seed, int rng_parameter)
     SPRNG_POINTER init_sprng(integer rng_type, integer seed, integer param)

[Quick Start] [User's Guide] [Reference Manual] [Quick Reference] [Next: Installation]