1HPL_dcopy(3) HPL Library Functions HPL_dcopy(3)
2
3
4
6 HPL_dcopy - y := x.
7
9 #include "hpl.h"
10
11 void HPL_dcopy( const int N, const double * X, const int INCX, double *
12 Y, const int INCY );
13
15 HPL_dcopy copies the vector x into the vector y.
16
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) const double *
23 On entry, X is an incremented array of dimension at least (
24 1 + ( n - 1 ) * abs( INCX ) ) that contains the vector x.
25
26 INCX (local input) const int
27 On entry, INCX specifies the increment for the elements of X.
28 INCX must not be zero.
29
30 Y (local input/output) double *
31 On entry, Y is an incremented array of dimension at least (
32 1 + ( n - 1 ) * abs( INCY ) ) that contains the vector y. On
33 exit, the entries of the incremented array Y are updated with
34 the entries of the incremented array X.
35
36 INCY (local input) const int
37 On entry, INCY specifies the increment for the elements of Y.
38 INCY must not be zero.
39
41 #include "hpl.h"
42
43 int main(int argc, char *argv[])
44 {
45 double x[3], y[3];
46 x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
47 y[0] = 4.0; y[1] = 5.0; y[2] = 6.0;
48 HPL_dcopy( 3, x, 1, y, 1 );
49 printf("y=[%f,%f,%f]\n", y[0], y[1], y[2]);
50 exit(0); return(0);
51 }
52
54 HPL_daxpy (3), HPL_dscal (3), HPL_dswap (3).
55
56
57
58HPL 2.1 October 26, 2012 HPL_dcopy(3)