1HPL_daxpy(3)                 HPL Library Functions                HPL_daxpy(3)
2
3
4

NAME

6       HPL_daxpy - y := y + alpha * x.
7

SYNOPSIS

9       #include "hpl.h"
10
11       void  HPL_daxpy(  const  int  N,  const double ALPHA, const double * X,
12       const int INCX, double * Y, const int INCY );
13

DESCRIPTION

15       HPL_daxpy scales the vector x by alpha and adds it to y.
16

ARGUMENTS

18       N       (local input)           const int
19               On entry, N specifies the length of the vectors  x  and   y.  N
20               must be at least zero.
21
22       ALPHA   (local input)           const double
23               On  entry,  ALPHA specifies the scalar alpha.   When  ALPHA  is
24               supplied as zero, then the entries of the incremented  array  X
25               need not be set on input.
26
27       X       (local input)           const double *
28               On entry,  X  is an incremented array of dimension  at  least (
29               1 + ( n - 1 ) * abs( INCX ) )  that  contains the vector x.
30
31       INCX    (local input)           const int
32               On entry, INCX specifies the increment for the elements  of  X.
33               INCX must not be zero.
34
35       Y       (local input/output)    double *
36               On entry,  Y  is an incremented array of dimension  at  least (
37               1 + ( n - 1 ) * abs( INCY ) )  that  contains the vector y.  On
38               exit, the entries of the incremented array  Y  are updated with
39               the scaled entries of the incremented array X.
40
41       INCY    (local input)           const int
42               On entry, INCY specifies the increment for the elements  of  Y.
43               INCY must not be zero.
44

EXAMPLE

46       #include "hpl.h"
47
48       int main(int argc, char *argv[])
49       {
50          double x[3], y[3];
51          x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
52          y[0] = 4.0; y[1] = 5.0; y[2] = 6.0;
53          HPL_daxpy( 3, 2.0, x, 1, y, 1 );
54          printf("y=[%f,%f,%f]\n", y[0], y[1], y[2]);
55          exit(0); return(0);
56       }
57

SEE ALSO

59       HPL_dcopy (3), HPL_dscal (3), HPL_dswap (3).
60
61
62
63HPL 2.2                        February 24, 2016                  HPL_daxpy(3)
Impressum