annotate src/SFMT/SFMT-params.h @ 526:2620d6318e8d

sound recording complete.
author Robert McIntyre <rlm@mit.edu>
date Sun, 24 Jun 2012 13:34:15 -0500
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 #ifndef SFMT_PARAMS_H
rlm@1 2 #define SFMT_PARAMS_H
rlm@1 3
rlm@1 4 #if !defined(MEXP)
rlm@1 5 #ifdef __GNUC__
rlm@1 6 #warning "MEXP is not defined. I assume MEXP is 19937."
rlm@1 7 #endif
rlm@1 8 #define MEXP 19937
rlm@1 9 #endif
rlm@1 10 /*-----------------
rlm@1 11 BASIC DEFINITIONS
rlm@1 12 -----------------*/
rlm@1 13 /** Mersenne Exponent. The period of the sequence
rlm@1 14 * is a multiple of 2^MEXP-1.
rlm@1 15 * #define MEXP 19937 */
rlm@1 16 /** SFMT generator has an internal state array of 128-bit integers,
rlm@1 17 * and N is its size. */
rlm@1 18 #define N (MEXP / 128 + 1)
rlm@1 19 /** N32 is the size of internal state array when regarded as an array
rlm@1 20 * of 32-bit integers.*/
rlm@1 21 #define N32 (N * 4)
rlm@1 22 /** N64 is the size of internal state array when regarded as an array
rlm@1 23 * of 64-bit integers.*/
rlm@1 24 #define N64 (N * 2)
rlm@1 25
rlm@1 26 /*----------------------
rlm@1 27 the parameters of SFMT
rlm@1 28 following definitions are in paramsXXXX.h file.
rlm@1 29 ----------------------*/
rlm@1 30 /** the pick up position of the array.
rlm@1 31 #define POS1 122
rlm@1 32 */
rlm@1 33
rlm@1 34 /** the parameter of shift left as four 32-bit registers.
rlm@1 35 #define SL1 18
rlm@1 36 */
rlm@1 37
rlm@1 38 /** the parameter of shift left as one 128-bit register.
rlm@1 39 * The 128-bit integer is shifted by (SL2 * 8) bits.
rlm@1 40 #define SL2 1
rlm@1 41 */
rlm@1 42
rlm@1 43 /** the parameter of shift right as four 32-bit registers.
rlm@1 44 #define SR1 11
rlm@1 45 */
rlm@1 46
rlm@1 47 /** the parameter of shift right as one 128-bit register.
rlm@1 48 * The 128-bit integer is shifted by (SL2 * 8) bits.
rlm@1 49 #define SR2 1
rlm@1 50 */
rlm@1 51
rlm@1 52 /** A bitmask, used in the recursion. These parameters are introduced
rlm@1 53 * to break symmetry of SIMD.
rlm@1 54 #define MSK1 0xdfffffefU
rlm@1 55 #define MSK2 0xddfecb7fU
rlm@1 56 #define MSK3 0xbffaffffU
rlm@1 57 #define MSK4 0xbffffff6U
rlm@1 58 */
rlm@1 59
rlm@1 60 /** These definitions are part of a 128-bit period certification vector.
rlm@1 61 #define PARITY1 0x00000001U
rlm@1 62 #define PARITY2 0x00000000U
rlm@1 63 #define PARITY3 0x00000000U
rlm@1 64 #define PARITY4 0xc98e126aU
rlm@1 65 */
rlm@1 66
rlm@1 67 #if MEXP == 607
rlm@1 68 #include "SFMT-params607.h"
rlm@1 69 #elif MEXP == 1279
rlm@1 70 #include "SFMT-params1279.h"
rlm@1 71 #elif MEXP == 2281
rlm@1 72 #include "SFMT-params2281.h"
rlm@1 73 #elif MEXP == 4253
rlm@1 74 #include "SFMT-params4253.h"
rlm@1 75 #elif MEXP == 11213
rlm@1 76 #include "SFMT-params11213.h"
rlm@1 77 #elif MEXP == 19937
rlm@1 78 #include "SFMT-params19937.h"
rlm@1 79 #elif MEXP == 44497
rlm@1 80 #include "SFMT-params44497.h"
rlm@1 81 #elif MEXP == 86243
rlm@1 82 #include "SFMT-params86243.h"
rlm@1 83 #elif MEXP == 132049
rlm@1 84 #include "SFMT-params132049.h"
rlm@1 85 #elif MEXP == 216091
rlm@1 86 #include "SFMT-params216091.h"
rlm@1 87 #else
rlm@1 88 #ifdef __GNUC__
rlm@1 89 #error "MEXP is not valid."
rlm@1 90 #undef MEXP
rlm@1 91 #else
rlm@1 92 #undef MEXP
rlm@1 93 #endif
rlm@1 94
rlm@1 95 #endif
rlm@1 96
rlm@1 97 #endif /* SFMT_PARAMS_H */