1HPL_setran(3) HPL Library Functions HPL_setran(3)
2
3
4
6 HPL_setran - Manage the random number generator.
7
9 #include "hpl.h"
10
11 void HPL_setran( const int OPTION, int * IRAN );
12
14 HPL_setran initializes the random generator with the encoding of the
15 first number X(0) in the sequence, and the constants a and c used to
16 compute the next element in the sequence: X(n+1) = a*X(n) + c. X(0), a
17 and c are stored in the static variables irand, ias and ics. When
18 OPTION is 0 (resp. 1 and 2), irand (resp. ia and ic) is set to the
19 values of the input array IRAN. When OPTION is 3, IRAN is set to the
20 current value of irand, and irand is then incremented.
21
23 OPTION (local input) const int
24 On entry, OPTION is an integer that specifies the operations
25 to be performed on the random generator as specified above.
26
27 IRAN (local input/output) int *
28 On entry, IRAN is an array of dimension 2, that contains the
29 16-lower and 15-higher bits of a random number.
30
32 HPL_ladd (3), HPL_lmul (3), HPL_xjumpm (3), HPL_jumpit (3),
33 HPL_rand (3).
34
35
36
37HPL 2.2 February 24, 2016 HPL_setran(3)