Statistiques
| Révision :

root / man / man3 / HPL_dscal.3 @ 1

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

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