LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

◆ zcopy()

 subroutine zcopy ( integer N, complex*16, dimension(*) ZX, integer INCX, complex*16, dimension(*) ZY, integer INCY )

ZCOPY

Purpose:
`    ZCOPY copies a vector, x, to a vector, y.`
Parameters
 [in] N ``` N is INTEGER number of elements in input vector(s)``` [in] ZX ` ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )` [in] INCX ``` INCX is INTEGER storage spacing between elements of ZX``` [out] ZY ` ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )` [in] INCY ``` INCY is INTEGER storage spacing between elements of ZY```
Date
November 2017
Further Details:
```     jack dongarra, linpack, 4/11/78.
modified 12/3/93, array(1) declarations changed to array(*)```

Definition at line 83 of file zcopy.f.

83 *
84 * -- Reference BLAS level1 routine (version 3.8.0) --
85 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
86 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
87 * November 2017
88 *
89 * .. Scalar Arguments ..
90  INTEGER incx,incy,n
91 * ..
92 * .. Array Arguments ..
93  COMPLEX*16 zx(*),zy(*)
94 * ..
95 *
96 * =====================================================================
97 *
98 * .. Local Scalars ..
99  INTEGER i,ix,iy
100 * ..
101  IF (n.LE.0) RETURN
102  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
103 *
104 * code for both increments equal to 1
105 *
106  DO i = 1,n
107  zy(i) = zx(i)
108  END DO
109  ELSE
110 *
111 * code for unequal increments or equal increments
112 * not equal to 1
113 *
114  ix = 1
115  iy = 1
116  IF (incx.LT.0) ix = (-n+1)*incx + 1
117  IF (incy.LT.0) iy = (-n+1)*incy + 1
118  DO i = 1,n
119  zy(iy) = zx(ix)
120  ix = ix + incx
121  iy = iy + incy
122  END DO
123  END IF
124  RETURN