Statistiques
| Révision :

root / man / man3 / HPL_setran.3 @ 1

Historique | Voir | Annoter | Télécharger (1,2 ko)

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