Changes to SPRNG 4.0

How is version 4.0 different?

1. SPRNG 4.0 is a C++ Version with GMP removed. It is not backwards compatible with any of previous versions, except for its default FORTRAN interface.

2. SPRNG 4.0 provides two interfaces, Default and Simple. Pointer-Checking is no longer available.

3. In previous versions, all random number generators are stored as C structures. In version 4.0, each random number is stored as an object (LFG, LCG, LCG64, CMRG, MLFG, PMLCG). All six random number generators inherit from parent class SPRNG. In the default C++ interface, the user must call function SelectType(int gtype) before calling the initialization function. This function returns the an inherited SPRNG object based on the generator type number based on 0 for LFG, 1 for LCG, 2 for LCG64, 3 for CMRG, 4 for MLFG and 5 for PMLCG.

4. In version 4.0, sprng_cpp.h replaces the previous sprng.h. Therefore, it is now necessary to include sprng_cpp.h for C++ programs. The required header filer for FORTRAN remains the same (sprng_f.h).

5. SPRNG function prototypes have been slightly changed, but they are still used for the same purposes. In C++, he functions for the default interface are SPRNG member functions. Please visit Quick Reference for the new functions.

6. The procedure to add a new generator to SPRNG has been changed slightly. In version 4.0, the user needs to modify SRC/.template.cpp and SRC/.template.h.

7. We made a couple of other changes for the new version in order to conform to C++ standards. Most of these other changes were made in directory SRC, involving combining, adding and deleting files. For example, in SPRNG 2.0, interface.h declared SPRNG functions and the main function of sprng.h was to replace function names. In version 4.0, we have combined these two files as one single file sprng.h. In addition, SPRNG function definitions and declarations for all interfaces were provided in many files, including simple.c, simple_.h, and simple_mpi.c. We have combined function definitions for all user interfaces (Default and Simple) in the file sprng.cpp because we felt that this modification would be more clear in C++. A couple of other files have been removed as well, including checkid.c, which was used for pointer checking.

8. Autoconf / Automake have been added. Therefore, it is easier to install the software.

9. In EXAMPLES, all MPI examples have been moved to directory mpisprng. In TESTS, all MPI tests have been moved to directory mpitets.


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