LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ 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```
Further Details:
```     jack dongarra, linpack, 4/11/78.
modified 12/3/93, array(1) declarations changed to array(*)```

Definition at line 80 of file zcopy.f.

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