[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


SSWAP, DSWAP, CSWAP, or ZSWAP Subroutine

Purpose

Interchanges vectors X and Y.

Library

BLAS Library (libblas.a)

FORTRAN Syntax


SUBROUTINE SSWAP(N,X,INCX,Y,INCY)
INTEGER INCX, INCY, N
REAL X(*), Y(*)

SUBROUTINE DSWAP(N,X,INCX,Y,INCY)
INTEGER INCX,INCY,N
DOUBLE PRECISION X(*),Y(*)

SUBROUTINE CSWAP(N,X,INCX,Y,INCY)
INTEGER INCX,INCY,N
COMPLEX X(*),Y(*)

SUBROUTINE ZSWAP(N,X,INCX,Y,INCY)
INTEGER INCX,INCY,N
COMPLEX*16 X(*),Y(*)

Description

The SSWAP, DSWAP, CSWAP, or ZSWAP subroutine interchanges vector X and vector Y.

Parameters


N On entry, N specifies the number of elements in X and Y; unchanged on exit.
X Vector of dimension at least (1 + (N-1) * abs(INCX) ); on exit, contains the elements of vector Y.
INCX On entry, INCX specifies the increment for the elements of X; unchanged on exit.
Y Vector of dimension at least (1 + (N-1) * abs(INCY) ); on exit, contains the elements of vector X.
INCY On entry, INCY specifies the increment for the elements of Y; unchanged on exit.

Error Codes

For values of N <= 0, the subroutines return immediately.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]