![]() |
![]()
| ![]() |
![]()
NAMEHPL_setran - Manage the random number generator. SYNOPSIS#include "hpl.h" void HPL_setran( const int OPTION, int * IRAN ); DESCRIPTIONHPL_setran initializes the random generator with the encoding of the first number X(0) in the sequence, and the constants a and c used to compute the next element in the sequence: X(n+1) = a*X(n) + c. X(0), a and c are stored in the static variables irand, ias and ics. When OPTION is 0 (resp. 1 and 2), irand (resp. ia and ic) is set to the values of the input array IRAN. When OPTION is 3, IRAN is set to the current value of irand, and irand is then incremented. ARGUMENTS
SEE ALSOHPL_ladd (3), HPL_lmul (3), HPL_xjumpm (3), HPL_jumpit (3), HPL_rand (3).
|