LAPACK
3.9.0
LAPACK: Linear Algebra PACKage
caxpy.f
Go to the documentation of this file.
1
*> \brief \b CAXPY
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 CAXPY(N,CA,CX,INCX,CY,INCY)
12
*
13
* .. Scalar Arguments ..
14
* COMPLEX CA
15
* INTEGER INCX,INCY,N
16
* ..
17
* .. Array Arguments ..
18
* COMPLEX CX(*),CY(*)
19
* ..
20
*
21
*
22
*> \par Purpose:
23
* =============
24
*>
25
*> \verbatim
26
*>
27
*> CAXPY constant times a vector plus a vector.
28
*> \endverbatim
29
*
30
* Arguments:
31
* ==========
32
*
33
*> \param[in] N
34
*> \verbatim
35
*> N is INTEGER
36
*> number of elements in input vector(s)
37
*> \endverbatim
38
*>
39
*> \param[in] CA
40
*> \verbatim
41
*> CA is COMPLEX
42
*> On entry, CA specifies the scalar alpha.
43
*> \endverbatim
44
*>
45
*> \param[in] CX
46
*> \verbatim
47
*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
48
*> \endverbatim
49
*>
50
*> \param[in] INCX
51
*> \verbatim
52
*> INCX is INTEGER
53
*> storage spacing between elements of CX
54
*> \endverbatim
55
*>
56
*> \param[in,out] CY
57
*> \verbatim
58
*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
59
*> \endverbatim
60
*>
61
*> \param[in] INCY
62
*> \verbatim
63
*> INCY is INTEGER
64
*> storage spacing between elements of CY
65
*> \endverbatim
66
*
67
* Authors:
68
* ========
69
*
70
*> \author Univ. of Tennessee
71
*> \author Univ. of California Berkeley
72
*> \author Univ. of Colorado Denver
73
*> \author NAG Ltd.
74
*
75
*> \date November 2017
76
*
77
*> \ingroup complex_blas_level1
78
*
79
*> \par Further Details:
80
* =====================
81
*>
82
*> \verbatim
83
*>
84
*> jack dongarra, linpack, 3/11/78.
85
*> modified 12/3/93, array(1) declarations changed to array(*)
86
*> \endverbatim
87
*>
88
* =====================================================================
89
SUBROUTINE
caxpy
(N,CA,CX,INCX,CY,INCY)
90
*
91
* -- Reference BLAS level1 routine (version 3.8.0) --
92
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
93
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
94
* November 2017
95
*
96
* .. Scalar Arguments ..
97
COMPLEX
CA
98
INTEGER
INCX,INCY,N
99
* ..
100
* .. Array Arguments ..
101
COMPLEX
CX(*),CY(*)
102
* ..
103
*
104
* =====================================================================
105
*
106
* .. Local Scalars ..
107
INTEGER
I,IX,IY
108
* ..
109
* .. External Functions ..
110
REAL
SCABS1
111
EXTERNAL
scabs1
112
* ..
113
IF
(n.LE.0)
RETURN
114
IF
(scabs1(ca).EQ.0.0e+0)
RETURN
115
IF
(incx.EQ.1 .AND. incy.EQ.1)
THEN
116
*
117
* code for both increments equal to 1
118
*
119
DO
i = 1,n
120
cy(i) = cy(i) + ca*cx(i)
121
END DO
122
ELSE
123
*
124
* code for unequal increments or equal increments
125
* not equal to 1
126
*
127
ix = 1
128
iy = 1
129
IF
(incx.LT.0) ix = (-n+1)*incx + 1
130
IF
(incy.LT.0) iy = (-n+1)*incy + 1
131
DO
i = 1,n
132
cy(iy) = cy(iy) + ca*cx(ix)
133
ix = ix + incx
134
iy = iy + incy
135
END DO
136
END IF
137
*
138
RETURN
139
END
caxpy
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
Definition:
caxpy.f:90
BLAS
SRC
caxpy.f
Generated on Wed May 5 2021 15:10:29 for LAPACK by
1.8.16