![](/images/backgrounds/286162/hp-hp-ux-performance-tools-users-manual-156076172x1.png)
SSWAP/DSWAP/ISWAP/CSWAP/ZSWAP | Swap two vectors |
Example 1 Interchange REAL*8 vectors x and y, where x and y are vectors 10 elements long stored in
INTEGER*4 | N,INCX,INCY | |
REAL*8 | X(20),Y(20) | |
N = 10 |
| |
INCX | = 1 |
|
INCY | = 1 |
|
CALL DSWAP (N,X,INCX,Y,INCY)
Example 2 Interchange rows 3 and 6 of a
INTEGER*4 | N,INCA | |
REAL*8 | A(20,21) | |
N = 10 |
| |
INCA | = 20 |
|
CALL | DSWAP (N,A(3,1),INCA,A(6,1),INCA) |
144HP MLIB User’s Guide