Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/zgeru.c

raw symbols SCIP
1 /* blas/zgeru.f -- translated by f2c (version 20090411).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
7 cc *.o -lf2c -lm
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10 http://www.netlib.org/f2c/libf2c.zip
11 */
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/
17
18 /*< SUBROUTINE ZGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA) >*/
19 /* Subroutine */ int zgeru_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:372:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *m, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *alpha,
20 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *x, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *incx, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *y, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *incy,
21 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *a, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *lda)
22 {
23 /* System generated locals */
24 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
25 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! z__1, z__2;
26
27 /* Local variables */
28 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, j, ix, jy, kx, info;
29 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! temp;
30 extern /* Subroutine */ int xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
31
32 /* .. Scalar Arguments .. */
33 /*< DOUBLE COMPLEX ALPHA >*/
34 /*< INTEGER INCX,INCY,LDA,M,N >*/
35 /* .. */
36 /* .. Array Arguments .. */
37 /*< DOUBLE COMPLEX A(LDA,*),X(*),Y(*) >*/
38 /* .. */
39
40 /* Purpose */
41 /* ======= */
42
43 /* ZGERU performs the rank 1 operation */
44
45 /* A := alpha*x*y' + A, */
46
47 /* where alpha is a scalar, x is an m element vector, y is an n element */
48 /* vector and A is an m by n matrix. */
49
50 /* Arguments */
51 /* ========== */
52
53 /* M - INTEGER. */
54 /* On entry, M specifies the number of rows of the matrix A. */
55 /* M must be at least zero. */
56 /* Unchanged on exit. */
57
58 /* N - INTEGER. */
59 /* On entry, N specifies the number of columns of the matrix A. */
60 /* N must be at least zero. */
61 /* Unchanged on exit. */
62
63 /* ALPHA - COMPLEX*16 . */
64 /* On entry, ALPHA specifies the scalar alpha. */
65 /* Unchanged on exit. */
66
67 /* X - COMPLEX*16 array of dimension at least */
68 /* ( 1 + ( m - 1 )*abs( INCX ) ). */
69 /* Before entry, the incremented array X must contain the m */
70 /* element vector x. */
71 /* Unchanged on exit. */
72
73 /* INCX - INTEGER. */
74 /* On entry, INCX specifies the increment for the elements of */
75 /* X. INCX must not be zero. */
76 /* Unchanged on exit. */
77
78 /* Y - COMPLEX*16 array of dimension at least */
79 /* ( 1 + ( n - 1 )*abs( INCY ) ). */
80 /* Before entry, the incremented array Y must contain the n */
81 /* element vector y. */
82 /* Unchanged on exit. */
83
84 /* INCY - INTEGER. */
85 /* On entry, INCY specifies the increment for the elements of */
86 /* Y. INCY must not be zero. */
87 /* Unchanged on exit. */
88
89 /* A - COMPLEX*16 array of DIMENSION ( LDA, n ). */
90 /* Before entry, the leading m by n part of the array A must */
91 /* contain the matrix of coefficients. On exit, A is */
92 /* overwritten by the updated matrix. */
93
94 /* LDA - INTEGER. */
95 /* On entry, LDA specifies the first dimension of A as declared */
96 /* in the calling (sub) program. LDA must be at least */
97 /* max( 1, m ). */
98 /* Unchanged on exit. */
99
100
101 /* Level 2 Blas routine. */
102
103 /* -- Written on 22-October-1986. */
104 /* Jack Dongarra, Argonne National Lab. */
105 /* Jeremy Du Croz, Nag Central Office. */
106 /* Sven Hammarling, Nag Central Office. */
107 /* Richard Hanson, Sandia National Labs. */
108
109
110 /* .. Parameters .. */
111 /*< DOUBLE COMPLEX ZERO >*/
112 /*< PARAMETER (ZERO= (0.0D+0,0.0D+0)) >*/
113 /* .. */
114 /* .. Local Scalars .. */
115 /*< DOUBLE COMPLEX TEMP >*/
116 /*< INTEGER I,INFO,IX,J,JY,KX >*/
117 /* .. */
118 /* .. External Subroutines .. */
119 /*< EXTERNAL XERBLA >*/
120 /* .. */
121 /* .. Intrinsic Functions .. */
122 /*< INTRINSIC MAX >*/
123 /* .. */
124
125 /* Test the input parameters. */
126
127 /*< INFO = 0 >*/
128 /* Parameter adjustments */
129 --x;
130 --y;
131 a_dim1 = *lda;
132 a_offset = 1 + a_dim1;
133 a -= a_offset;
134
135 /* Function Body */
136 info = 0;
137 /*< IF (M.LT.0) THEN >*/
138 if (*m < 0) {
139 /*< INFO = 1 >*/
140 info = 1;
141 /*< ELSE IF (N.LT.0) THEN >*/
142 } else if (*n < 0) {
143 /*< INFO = 2 >*/
144 info = 2;
145 /*< ELSE IF (INCX.EQ.0) THEN >*/
146 } else if (*incx == 0) {
147 /*< INFO = 5 >*/
148 info = 5;
149 /*< ELSE IF (INCY.EQ.0) THEN >*/
150 } else if (*incy == 0) {
151 /*< INFO = 7 >*/
152 info = 7;
153 /*< ELSE IF (LDA.LT.MAX(1,M)) THEN >*/
154 } else if (*lda < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*m)) {
155 /*< INFO = 9 >*/
156 info = 9;
157 /*< END IF >*/
158 }
159 /*< IF (INFO.NE.0) THEN >*/
160 if (info != 0) {
161 /*< CALL XERBLA('ZGERU ',INFO) >*/
162 xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!("ZGERU ", &info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)6);
163 /*< RETURN >*/
164 return 0;
165 /*< END IF >*/
166 }
167
168 /* Quick return if possible. */
169
170 /*< IF ((M.EQ.0) .OR. (N.EQ.0) .OR. (ALPHA.EQ.ZERO)) RETURN >*/
171 if (*m == 0 || *n == 0 || (alpha->rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. == 0. && alpha->icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. == 0.)) {
172 return 0;
173 }
174
175 /* Start the operations. In this version the elements of A are */
176 /* accessed sequentially with one pass through A. */
177
178 /*< IF (INCY.GT.0) THEN >*/
179 if (*incy > 0) {
180 /*< JY = 1 >*/
181 jy = 1;
182 /*< ELSE >*/
183 } else {
184 /*< JY = 1 - (N-1)*INCY >*/
185 jy = 1 - (*n - 1) * *incy;
186 /*< END IF >*/
187 }
188 /*< IF (INCX.EQ.1) THEN >*/
189 if (*incx == 1) {
190 /*< DO 20 J = 1,N >*/
191 i__1 = *n;
192 for (j = 1; j <= i__1; ++j) {
193 /*< IF (Y(JY).NE.ZERO) THEN >*/
194 i__2 = jy;
195 if (y[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. != 0. || y[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. != 0.) {
196 /*< TEMP = ALPHA*Y(JY) >*/
197 i__2 = jy;
198 z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = alpha->rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * y[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. - alpha->icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * y[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i., z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. =
199 alpha->rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * y[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. + alpha->icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * y[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r.;
200 temp.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., temp.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
201 /*< DO 10 I = 1,M >*/
202 i__2 = *m;
203 for (i__ = 1; i__ <= i__2; ++i__) {
204 /*< A(I,J) = A(I,J) + X(I)*TEMP >*/
205 i__3 = i__ + j * a_dim1;
206 i__4 = i__ + j * a_dim1;
207 i__5 = i__;
208 z__2.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = x[i__5].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * temp.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. - x[i__5].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * temp.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i., z__2.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. =
209 x[i__5].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * temp.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. + x[i__5].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * temp.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r.;
210 z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = a[i__4].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. + z__2.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = a[i__4].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. + z__2.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
211 a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., a[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
212 /*< 10 CONTINUE >*/
213 /* L10: */
214 }
215 /*< END IF >*/
216 }
217 /*< JY = JY + INCY >*/
218 jy += *incy;
219 /*< 20 CONTINUE >*/
220 /* L20: */
221 }
222 /*< ELSE >*/
223 } else {
224 /*< IF (INCX.GT.0) THEN >*/
225 if (*incx > 0) {
226 /*< KX = 1 >*/
227 kx = 1;
228 /*< ELSE >*/
229 } else {
230 /*< KX = 1 - (M-1)*INCX >*/
231 kx = 1 - (*m - 1) * *incx;
232 /*< END IF >*/
233 }
234 /*< DO 40 J = 1,N >*/
235 i__1 = *n;
236 for (j = 1; j <= i__1; ++j) {
237 /*< IF (Y(JY).NE.ZERO) THEN >*/
238 i__2 = jy;
239 if (y[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. != 0. || y[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. != 0.) {
240 /*< TEMP = ALPHA*Y(JY) >*/
241 i__2 = jy;
242 z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = alpha->rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * y[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. - alpha->icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * y[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i., z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. =
243 alpha->rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * y[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. + alpha->icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * y[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r.;
244 temp.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., temp.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
245 /*< IX = KX >*/
246 ix = kx;
247 /*< DO 30 I = 1,M >*/
248 i__2 = *m;
249 for (i__ = 1; i__ <= i__2; ++i__) {
250 /*< A(I,J) = A(I,J) + X(IX)*TEMP >*/
251 i__3 = i__ + j * a_dim1;
252 i__4 = i__ + j * a_dim1;
253 i__5 = ix;
254 z__2.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = x[i__5].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * temp.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. - x[i__5].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * temp.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i., z__2.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. =
255 x[i__5].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. * temp.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. + x[i__5].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. * temp.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r.;
256 z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = a[i__4].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. + z__2.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = a[i__4].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. + z__2.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
257 a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., a[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
258 /*< IX = IX + INCX >*/
259 ix += *incx;
260 /*< 30 CONTINUE >*/
261 /* L30: */
262 }
263 /*< END IF >*/
264 }
265 /*< JY = JY + INCY >*/
266 jy += *incy;
267 /*< 40 CONTINUE >*/
268 /* L40: */
269 }
270 /*< END IF >*/
271 }
272
273 /*< RETURN >*/
274 return 0;
275
276 /* End of ZGERU . */
277
278 /*< END >*/
279 } /* zgeru_ */
280
281 #ifdef __cplusplus
282 }
283 #endif