LAPACK
3.12.1
LAPACK: Linear Algebra PACKage
Toggle main menu visibility
Main Page
Related Pages
Routines
Modules
Modules List
Module Members
All
c
d
s
z
Functions/Subroutines
Variables
c
d
s
z
Data Types
Data Types List
Data Type Index
Data Fields
All
Functions/Subroutines
Variables
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
l
m
p
r
s
t
u
x
z
Functions/Subroutines
_
a
c
d
f
g
h
i
l
m
s
t
x
z
Variables
c
l
r
Typedefs
Enumerations
Enumerator
Macros
a
b
c
f
i
p
t
u
x
▼
LAPACK
►
LAPACK
►
Routines
►
Modules
►
Data Types
▼
Files
▼
File List
▼
BLAS
▼
SRC
►
caxpy.f
►
ccopy.f
►
cdotc.f
►
cdotu.f
►
cgbmv.f
►
cgemm.f
►
cgemmtr.f
►
cgemv.f
►
cgerc.f
►
cgeru.f
►
chbmv.f
►
chemm.f
►
chemv.f
►
cher.f
►
cher2.f
►
cher2k.f
►
cherk.f
►
chpmv.f
►
chpr.f
►
chpr2.f
►
crotg.f90
►
cscal.f
►
csrot.f
►
csscal.f
►
cswap.f
►
csymm.f
►
csyr2k.f
►
csyrk.f
►
ctbmv.f
►
ctbsv.f
►
ctpmv.f
►
ctpsv.f
►
ctrmm.f
►
ctrmv.f
►
ctrsm.f
►
ctrsv.f
►
dasum.f
►
daxpy.f
►
dcabs1.f
►
dcopy.f
►
ddot.f
►
dgbmv.f
►
dgemm.f
►
dgemmtr.f
►
dgemv.f
►
dger.f
►
dnrm2.f90
►
drot.f
►
drotg.f90
►
drotm.f
►
drotmg.f
►
dsbmv.f
►
dscal.f
►
dsdot.f
►
dspmv.f
►
dspr.f
►
dspr2.f
►
dswap.f
►
dsymm.f
►
dsymv.f
►
dsyr.f
►
dsyr2.f
►
dsyr2k.f
►
dsyrk.f
►
dtbmv.f
►
dtbsv.f
►
dtpmv.f
►
dtpsv.f
►
dtrmm.f
►
dtrmv.f
►
dtrsm.f
►
dtrsv.f
►
dzasum.f
►
dznrm2.f90
►
icamax.f
►
idamax.f
►
isamax.f
►
izamax.f
►
sasum.f
►
saxpy.f
►
scabs1.f
►
scasum.f
►
scnrm2.f90
►
scopy.f
►
sdot.f
►
sdsdot.f
►
sgbmv.f
►
sgemm.f
►
sgemmtr.f
►
sgemv.f
►
sger.f
►
snrm2.f90
►
srot.f
►
srotg.f90
►
srotm.f
►
srotmg.f
►
ssbmv.f
►
sscal.f
►
sspmv.f
►
sspr.f
►
sspr2.f
►
sswap.f
►
ssymm.f
►
ssymv.f
►
ssyr.f
►
ssyr2.f
►
ssyr2k.f
►
ssyrk.f
►
stbmv.f
►
stbsv.f
►
stpmv.f
►
stpsv.f
►
strmm.f
►
strmv.f
►
strsm.f
►
strsv.f
►
zaxpy.f
►
zcopy.f
►
zdotc.f
►
zdotu.f
►
zdrot.f
►
zdscal.f
►
zgbmv.f
►
zgemm.f
►
zgemmtr.f
►
zgemv.f
►
zgerc.f
►
zgeru.f
►
zhbmv.f
►
zhemm.f
►
zhemv.f
►
zher.f
►
zher2.f
►
zher2k.f
►
zherk.f
►
zhpmv.f
►
zhpr.f
►
zhpr2.f
►
zrotg.f90
►
zscal.f
►
zswap.f
►
zsymm.f
►
zsyr2k.f
►
zsyrk.f
►
ztbmv.f
►
ztbsv.f
►
ztpmv.f
►
ztpsv.f
►
ztrmm.f
►
ztrmv.f
►
ztrsm.f
►
ztrsv.f
►
TESTING
►
CBLAS
DOCS
►
INSTALL
►
SRC
►
TESTING
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
cswap.f
Go to the documentation of this file.
1
*> \brief \b CSWAP
2
*
3
* =========== DOCUMENTATION ===========
4
*
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
7
*
8
* Definition:
9
* ===========
10
*
11
* SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
12
*
13
* .. Scalar Arguments ..
14
* INTEGER INCX,INCY,N
15
* ..
16
* .. Array Arguments ..
17
* COMPLEX CX(*),CY(*)
18
* ..
19
*
20
*
21
*> \par Purpose:
22
* =============
23
*>
24
*> \verbatim
25
*>
26
*> CSWAP interchanges two vectors.
27
*> \endverbatim
28
*
29
* Arguments:
30
* ==========
31
*
32
*> \param[in] N
33
*> \verbatim
34
*> N is INTEGER
35
*> number of elements in input vector(s)
36
*> \endverbatim
37
*>
38
*> \param[in,out] CX
39
*> \verbatim
40
*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
41
*> \endverbatim
42
*>
43
*> \param[in] INCX
44
*> \verbatim
45
*> INCX is INTEGER
46
*> storage spacing between elements of CX
47
*> \endverbatim
48
*>
49
*> \param[in,out] CY
50
*> \verbatim
51
*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
52
*> \endverbatim
53
*>
54
*> \param[in] INCY
55
*> \verbatim
56
*> INCY is INTEGER
57
*> storage spacing between elements of CY
58
*> \endverbatim
59
*
60
* Authors:
61
* ========
62
*
63
*> \author Univ. of Tennessee
64
*> \author Univ. of California Berkeley
65
*> \author Univ. of Colorado Denver
66
*> \author NAG Ltd.
67
*
68
*> \ingroup swap
69
*
70
*> \par Further Details:
71
* =====================
72
*>
73
*> \verbatim
74
*>
75
*> jack dongarra, linpack, 3/11/78.
76
*> modified 12/3/93, array(1) declarations changed to array(*)
77
*> \endverbatim
78
*>
79
* =====================================================================
80
SUBROUTINE
cswap
(N,CX,INCX,CY,INCY)
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
CX(*),CY(*)
91
* ..
92
*
93
* =====================================================================
94
*
95
* .. Local Scalars ..
96
COMPLEX
CTEMP
97
INTEGER
I,IX,IY
98
* ..
99
IF
(n.LE.0)
RETURN
100
IF
(incx.EQ.1 .AND. incy.EQ.1)
THEN
101
*
102
* code for both increments equal to 1
103
DO
i = 1,n
104
ctemp = cx(i)
105
cx(i) = cy(i)
106
cy(i) = ctemp
107
END DO
108
ELSE
109
*
110
* code for unequal increments or equal increments not equal
111
* to 1
112
*
113
ix = 1
114
iy = 1
115
IF
(incx.LT.0) ix = (-n+1)*incx + 1
116
IF
(incy.LT.0) iy = (-n+1)*incy + 1
117
DO
i = 1,n
118
ctemp = cx(ix)
119
cx(ix) = cy(iy)
120
cy(iy) = ctemp
121
ix = ix + incx
122
iy = iy + incy
123
END DO
124
END IF
125
RETURN
126
*
127
* End of CSWAP
128
*
80
SUBROUTINE
cswap
(N,CX,INCX,CY,INCY)
…
129
END
cswap
subroutine cswap(n, cx, incx, cy, incy)
CSWAP
Definition
cswap.f:81
BLAS
SRC
cswap.f
Generated on Mon Jan 20 2025 17:18:05 for LAPACK by
1.11.0