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

NAME

6       HPL_dswap - y <-> x.
7

SYNOPSIS

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

DESCRIPTION

15       HPL_dswap swaps the vectors x and 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       X       (local input/output)    double *
23               On entry,  X  is an incremented array of dimension  at  least (
24               1 + ( n - 1 ) * abs( INCX ) )  that  contains the vector x.  On
25               exit, the entries of the incremented array  X  are updated with
26               the entries of the incremented array Y.
27
28       INCX    (local input)           const int
29               On entry, INCX specifies the increment for the elements  of  X.
30               INCX must not be zero.
31
32       Y       (local input/output)    double *
33               On entry,  Y  is an incremented array of dimension  at  least (
34               1 + ( n - 1 ) * abs( INCY ) )  that  contains the vector y.  On
35               exit, the entries of the incremented array  Y  are updated with
36               the entries of the incremented array X.
37
38       INCY    (local input)           const int
39               On entry, INCY specifies the increment for the elements  of  Y.
40               INCY must not be zero.
41

EXAMPLE

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

SEE ALSO

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