LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine icopy ( integer  N,
integer, dimension( * )  SX,
integer  INCX,
integer, dimension( * )  SY,
integer  INCY 
)

ICOPY

Purpose:
 ICOPY copies an integer vector x to an integer vector y.
 Uses unrolled loops for increments equal to 1.
Parameters
[in]N
          N is INTEGER
          The length of the vectors SX and SY.
[in]SX
          SX is INTEGER array, dimension (1+(N-1)*abs(INCX))
          The vector X.
[in]INCX
          INCX is INTEGER
          The spacing between consecutive elements of SX.
[out]SY
          SY is INTEGER array, dimension (1+(N-1)*abs(INCY))
          The vector Y.
[in]INCY
          INCY is INTEGER
          The spacing between consecutive elements of SY.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 77 of file icopy.f.

77 *
78 * -- LAPACK test routine (version 3.4.0) --
79 * -- LAPACK is a software package provided by Univ. of Tennessee, --
80 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
81 * November 2011
82 *
83 * .. Scalar Arguments ..
84  INTEGER incx, incy, n
85 * ..
86 * .. Array Arguments ..
87  INTEGER sx( * ), sy( * )
88 * ..
89 *
90 * =====================================================================
91 *
92 * .. Local Scalars ..
93  INTEGER i, ix, iy, m, mp1
94 * ..
95 * .. Intrinsic Functions ..
96  INTRINSIC mod
97 * ..
98 * .. Executable Statements ..
99 *
100  IF( n.LE.0 )
101  $ RETURN
102  IF( incx.EQ.1 .AND. incy.EQ.1 )
103  $ GO TO 20
104 *
105 * Code for unequal increments or equal increments not equal to 1
106 *
107  ix = 1
108  iy = 1
109  IF( incx.LT.0 )
110  $ ix = ( -n+1 )*incx + 1
111  IF( incy.LT.0 )
112  $ iy = ( -n+1 )*incy + 1
113  DO 10 i = 1, n
114  sy( iy ) = sx( ix )
115  ix = ix + incx
116  iy = iy + incy
117  10 CONTINUE
118  RETURN
119 *
120 * Code for both increments equal to 1
121 *
122 * Clean-up loop
123 *
124  20 CONTINUE
125  m = mod( n, 7 )
126  IF( m.EQ.0 )
127  $ GO TO 40
128  DO 30 i = 1, m
129  sy( i ) = sx( i )
130  30 CONTINUE
131  IF( n.LT.7 )
132  $ RETURN
133  40 CONTINUE
134  mp1 = m + 1
135  DO 50 i = mp1, n, 7
136  sy( i ) = sx( i )
137  sy( i+1 ) = sx( i+1 )
138  sy( i+2 ) = sx( i+2 )
139  sy( i+3 ) = sx( i+3 )
140  sy( i+4 ) = sx( i+4 )
141  sy( i+5 ) = sx( i+5 )
142  sy( i+6 ) = sx( i+6 )
143  50 CONTINUE
144  RETURN
145 *
146 * End of ICOPY
147 *

Here is the caller graph for this function: