root / man / man3 / HPL_daxpy.3
Historique | Voir | Annoter | Télécharger (1,89 ko)
1 |
.TH HPL_daxpy 3 "September 10, 2008" "HPL 2.0" "HPL Library Functions" |
---|---|
2 |
.SH NAME |
3 |
HPL_daxpy \- y := y + alpha * x. |
4 |
.SH SYNOPSIS |
5 |
\fB\&#include "hpl.h"\fR |
6 |
|
7 |
\fB\&void\fR |
8 |
\fB\&HPL_daxpy(\fR |
9 |
\fB\&const int\fR |
10 |
\fI\&N\fR, |
11 |
\fB\&const double\fR |
12 |
\fI\&ALPHA\fR, |
13 |
\fB\&const double *\fR |
14 |
\fI\&X\fR, |
15 |
\fB\&const int\fR |
16 |
\fI\&INCX\fR, |
17 |
\fB\&double *\fR |
18 |
\fI\&Y\fR, |
19 |
\fB\&const int\fR |
20 |
\fI\&INCY\fR |
21 |
\fB\&);\fR |
22 |
.SH DESCRIPTION |
23 |
\fB\&HPL_daxpy\fR |
24 |
scales the vector x by alpha and adds it to y. |
25 |
.SH ARGUMENTS |
26 |
.TP 8 |
27 |
N (local input) const int |
28 |
On entry, N specifies the length of the vectors x and y. N |
29 |
must be at least zero. |
30 |
.TP 8 |
31 |
ALPHA (local input) const double |
32 |
On entry, ALPHA specifies the scalar alpha. When ALPHA is |
33 |
supplied as zero, then the entries of the incremented array X |
34 |
need not be set on input. |
35 |
.TP 8 |
36 |
X (local input) const double * |
37 |
On entry, X is an incremented array of dimension at least |
38 |
( 1 + ( n - 1 ) * abs( INCX ) ) that contains the vector x. |
39 |
.TP 8 |
40 |
INCX (local input) const int |
41 |
On entry, INCX specifies the increment for the elements of X. |
42 |
INCX must not be zero. |
43 |
.TP 8 |
44 |
Y (local input/output) double * |
45 |
On entry, Y is an incremented array of dimension at least |
46 |
( 1 + ( n - 1 ) * abs( INCY ) ) that contains the vector y. |
47 |
On exit, the entries of the incremented array Y are updated |
48 |
with the scaled entries of the incremented array X. |
49 |
.TP 8 |
50 |
INCY (local input) const int |
51 |
On entry, INCY specifies the increment for the elements of Y. |
52 |
INCY must not be zero. |
53 |
.SH EXAMPLE |
54 |
\fI\&#include "hpl.h"\fR |
55 |
|
56 |
int main(int argc, char *argv[]) |
57 |
.br |
58 |
{ |
59 |
.br |
60 |
double x[3], y[3]; |
61 |
.br |
62 |
x[0] = 1.0; x[1] = 2.0; x[2] = 3.0; |
63 |
.br |
64 |
y[0] = 4.0; y[1] = 5.0; y[2] = 6.0; |
65 |
.br |
66 |
HPL_daxpy( 3, 2.0, x, 1, y, 1 ); |
67 |
.br |
68 |
printf("y=[%f,%f,%f]\en", y[0], y[1], y[2]); |
69 |
.br |
70 |
exit(0); return(0); |
71 |
.br |
72 |
} |
73 |
.SH SEE ALSO |
74 |
.BR HPL_dcopy \ (3), |
75 |
.BR HPL_dscal \ (3), |
76 |
.BR HPL_dswap \ (3). |