SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ icopy()

subroutine icopy ( integer  n,
integer, dimension( * )  sx,
integer  incx,
integer, dimension( * )  sy,
integer  incy 
)

Definition at line 1524 of file pblastst.f.

1525*
1526* -- LAPACK auxiliary test routine (version 2.1) --
1527* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
1528* Courant Institute, Argonne National Lab, and Rice University
1529* February 29, 1992
1530*
1531* .. Scalar Arguments ..
1532 INTEGER INCX, INCY, N
1533* ..
1534* .. Array Arguments ..
1535 INTEGER SX( * ), SY( * )
1536* ..
1537*
1538* Purpose
1539* =======
1540*
1541* ICOPY copies an integer vector x to an integer vector y.
1542* Uses unrolled loops for increments equal to 1.
1543*
1544* Arguments
1545* =========
1546*
1547* N (input) INTEGER
1548* The length of the vectors SX and SY.
1549*
1550* SX (input) INTEGER array, dimension (1+(N-1)*abs(INCX))
1551* The vector X.
1552*
1553* INCX (input) INTEGER
1554* The spacing between consecutive elements of SX.
1555*
1556* SY (output) INTEGER array, dimension (1+(N-1)*abs(INCY))
1557* The vector Y.
1558*
1559* INCY (input) INTEGER
1560* The spacing between consecutive elements of SY.
1561*
1562* =====================================================================
1563*
1564* .. Local Scalars ..
1565 INTEGER I, IX, IY, M, MP1
1566* ..
1567* .. Intrinsic Functions ..
1568 INTRINSIC mod
1569* ..
1570* .. Executable Statements ..
1571*
1572 IF( n.LE.0 )
1573 $ RETURN
1574 IF( incx.EQ.1 .AND. incy.EQ.1 )
1575 $ GO TO 20
1576*
1577* Code for unequal increments or equal increments not equal to 1
1578*
1579 ix = 1
1580 iy = 1
1581 IF( incx.LT.0 )
1582 $ ix = ( -n+1 )*incx + 1
1583 IF( incy.LT.0 )
1584 $ iy = ( -n+1 )*incy + 1
1585 DO 10 i = 1, n
1586 sy( iy ) = sx( ix )
1587 ix = ix + incx
1588 iy = iy + incy
1589 10 CONTINUE
1590 RETURN
1591*
1592* Code for both increments equal to 1
1593*
1594* Clean-up loop
1595*
1596 20 CONTINUE
1597 m = mod( n, 7 )
1598 IF( m.EQ.0 )
1599 $ GO TO 40
1600 DO 30 i = 1, m
1601 sy( i ) = sx( i )
1602 30 CONTINUE
1603 IF( n.LT.7 )
1604 $ RETURN
1605 40 CONTINUE
1606 mp1 = m + 1
1607 DO 50 i = mp1, n, 7
1608 sy( i ) = sx( i )
1609 sy( i+1 ) = sx( i+1 )
1610 sy( i+2 ) = sx( i+2 )
1611 sy( i+3 ) = sx( i+3 )
1612 sy( i+4 ) = sx( i+4 )
1613 sy( i+5 ) = sx( i+5 )
1614 sy( i+6 ) = sx( i+6 )
1615 50 CONTINUE
1616 RETURN
1617*
1618* End of ICOPY
1619*