The Advanced Service routines refer to a structure defining the properties of the basic generator. This structure is described in Fortran 90 as follows: TYPE VSL_BRNG_PROPERTIES
INTEGER streamstatesize
INTEGER nseeds
INTEGER includeszero
INTEGER wordsize
INTEGER nbits
INTEGER nitstream
INTEGER sbrng
INTEGER dbrng
INTEGER ibrng
END TYPE VSL_BRNG_PROPERTIES
The C version is as follows: typedef struct _VSLBRngProperties {
int StreamStateSize;
int NSeeds;
int IncludesZero;
int WordSize;
int NBits;
InitStreamPtr InitStream;
sBRngPtr sBRng;
dBRngPtr dBRng;
iBRngPtr iBRng;
} VSLBRngProperties;
The following table provides brief descriptions of the fields engaged in the above structure:
Field |
Short Description |
---|---|
Fortran: streamstatesize C: StreamStateSize |
The size, in bytes, of the stream state structure for a given basic generator. |
Fortran: nseeds C: NSeeds |
The number of 32-bit initial conditions (seeds) necessary to initialize the stream state structure for a given basic generator. |
Fortran: includeszero C: IncludesZero |
Flag value indicating whether the generator can produce a random 0. |
Fortran: wordsize C: WordSize |
Machine word size, in bytes, used in integer-value computations. Possible values: 4, 8, and 16 for 32, 64, and 128-bit generators, respectively. |
Fortran: nbits C: NBits |
The number of bits required to represent a random value in integer arithmetic. Note that, for instance, 48-bit random values are stored to 64-bit (8 byte) memory locations. In this case, wordsize/WordSize is equal to 8 (number of bytes used to store the random value), while nbits/NBits contains the actual number of bits occupied by the value (in this example, 48). |
Fortran: initstream C: InitStream |
Contains the pointer to the initialization routine of a given basic generator. |
Fortran: sbrng C: sBRng |
Contains the pointer to the basic generator of single precision real numbers uniformly distributed over the interval (a,b) (real in Fortran and float in C). |
Fortran: dbrng C: dBRng |
Contains the pointer to the basic generator of double precision real numbers uniformly distributed over the interval (a,b) (double PRECISION in Fortran and double in C). |
Fortran: ibrng C: iBRng |
Contains the pointer to the basic generator of integer numbers with uniform bit distribution1 (INTEGER in Fortran and unsigned int in C). |
1A specific generator that permits operations over single bits and bit groups of random numbers.