Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/lapack/complex16/zunm2r.c

raw symbols SCIP
1 /* lapack/complex16/zunm2r.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 /* Table of constant values */
19
20 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__1cxx . . $ c__1. = 1;
21
22 /*< >*/
23 /* Subroutine */ int zunm2r_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:366:9`!(char *side, char *trans, 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,
24 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *k, 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, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *tau,
25 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *c__, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldc, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *work, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info,
26 ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! side_len, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! trans_len)
27 {
28 /* System generated locals */
29 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3;
30 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! z__1;
31
32 /* Builtin functions */
33 void d_cnjgcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:11:9`!(doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *);
34
35 /* Local variables */
36 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, i1, i2, i3, ic, jc, mi, ni, nq;
37 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! aii;
38 logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! left;
39 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! taui;
40 extern logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(const char *, const char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
41 extern /* Subroutine */ int zlarf_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:328:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
42 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *,
43 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!), 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`! *,
44 ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
45 logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! notran;
46 (void)side_len;
47 (void)trans_len;
48
49 /* -- LAPACK routine (version 3.2) -- */
50 /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
51 /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
52 /* November 2006 */
53
54 /* .. Scalar Arguments .. */
55 /*< CHARACTER SIDE, TRANS >*/
56 /*< INTEGER INFO, K, LDA, LDC, M, N >*/
57 /* .. */
58 /* .. Array Arguments .. */
59 /*< COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) >*/
60 /* .. */
61
62 /* Purpose */
63 /* ======= */
64
65 /* ZUNM2R overwrites the general complex m-by-n matrix C with */
66
67 /* Q * C if SIDE = 'L' and TRANS = 'N', or */
68
69 /* Q'* C if SIDE = 'L' and TRANS = 'C', or */
70
71 /* C * Q if SIDE = 'R' and TRANS = 'N', or */
72
73 /* C * Q' if SIDE = 'R' and TRANS = 'C', */
74
75 /* where Q is a complex unitary matrix defined as the product of k */
76 /* elementary reflectors */
77
78 /* Q = H(1) H(2) . . . H(k) */
79
80 /* as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n */
81 /* if SIDE = 'R'. */
82
83 /* Arguments */
84 /* ========= */
85
86 /* SIDE (input) CHARACTER*1 */
87 /* = 'L': apply Q or Q' from the Left */
88 /* = 'R': apply Q or Q' from the Right */
89
90 /* TRANS (input) CHARACTER*1 */
91 /* = 'N': apply Q (No transpose) */
92 /* = 'C': apply Q' (Conjugate transpose) */
93
94 /* M (input) INTEGER */
95 /* The number of rows of the matrix C. M >= 0. */
96
97 /* N (input) INTEGER */
98 /* The number of columns of the matrix C. N >= 0. */
99
100 /* K (input) INTEGER */
101 /* The number of elementary reflectors whose product defines */
102 /* the matrix Q. */
103 /* If SIDE = 'L', M >= K >= 0; */
104 /* if SIDE = 'R', N >= K >= 0. */
105
106 /* A (input) COMPLEX*16 array, dimension (LDA,K) */
107 /* The i-th column must contain the vector which defines the */
108 /* elementary reflector H(i), for i = 1,2,...,k, as returned by */
109 /* ZGEQRF in the first k columns of its array argument A. */
110 /* A is modified by the routine but restored on exit. */
111
112 /* LDA (input) INTEGER */
113 /* The leading dimension of the array A. */
114 /* If SIDE = 'L', LDA >= max(1,M); */
115 /* if SIDE = 'R', LDA >= max(1,N). */
116
117 /* TAU (input) COMPLEX*16 array, dimension (K) */
118 /* TAU(i) must contain the scalar factor of the elementary */
119 /* reflector H(i), as returned by ZGEQRF. */
120
121 /* C (input/output) COMPLEX*16 array, dimension (LDC,N) */
122 /* On entry, the m-by-n matrix C. */
123 /* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. */
124
125 /* LDC (input) INTEGER */
126 /* The leading dimension of the array C. LDC >= max(1,M). */
127
128 /* WORK (workspace) COMPLEX*16 array, dimension */
129 /* (N) if SIDE = 'L', */
130 /* (M) if SIDE = 'R' */
131
132 /* INFO (output) INTEGER */
133 /* = 0: successful exit */
134 /* < 0: if INFO = -i, the i-th argument had an illegal value */
135
136 /* ===================================================================== */
137
138 /* .. Parameters .. */
139 /*< COMPLEX*16 ONE >*/
140 /*< PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) >*/
141 /* .. */
142 /* .. Local Scalars .. */
143 /*< LOGICAL LEFT, NOTRAN >*/
144 /*< INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ >*/
145 /*< COMPLEX*16 AII, TAUI >*/
146 /* .. */
147 /* .. External Functions .. */
148 /*< LOGICAL LSAME >*/
149 /*< EXTERNAL LSAME >*/
150 /* .. */
151 /* .. External Subroutines .. */
152 /*< EXTERNAL XERBLA, ZLARF >*/
153 /* .. */
154 /* .. Intrinsic Functions .. */
155 /*< INTRINSIC DCONJG, MAX >*/
156 /* .. */
157 /* .. Executable Statements .. */
158
159 /* Test the input arguments */
160
161 /*< INFO = 0 >*/
162 /* Parameter adjustments */
163 a_dim1 = *lda;
164 a_offset = 1 + a_dim1;
165 a -= a_offset;
166 --tau;
167 c_dim1 = *ldc;
168 c_offset = 1 + c_dim1;
169 c__ -= c_offset;
170 --work;
171
172 /* Function Body */
173 *info = 0;
174 /*< LEFT = LSAME( SIDE, 'L' ) >*/
175 left = lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(side, "L", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
176 /*< NOTRAN = LSAME( TRANS, 'N' ) >*/
177 notran = lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(trans, "N", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
178
179 /* NQ is the order of Q */
180
181 /*< IF( LEFT ) THEN >*/
182 if (left) {
183 /*< NQ = M >*/
184 nq = *m;
185 /*< ELSE >*/
186 } else {
187 /*< NQ = N >*/
188 nq = *n;
189 /*< END IF >*/
190 }
191 /*< IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN >*/
192 if (! left && ! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(side, "R", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) {
193 /*< INFO = -1 >*/
194 *info = -1;
195 /*< ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN >*/
196 } else if (! notran && ! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(trans, "C", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) {
197 /*< INFO = -2 >*/
198 *info = -2;
199 /*< ELSE IF( M.LT.0 ) THEN >*/
200 } else if (*m < 0) {
201 /*< INFO = -3 >*/
202 *info = -3;
203 /*< ELSE IF( N.LT.0 ) THEN >*/
204 } else if (*n < 0) {
205 /*< INFO = -4 >*/
206 *info = -4;
207 /*< ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN >*/
208 } else if (*k < 0 || *k > nq) {
209 /*< INFO = -5 >*/
210 *info = -5;
211 /*< ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN >*/
212 } else if (*lda < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,nq)) {
213 /*< INFO = -7 >*/
214 *info = -7;
215 /*< ELSE IF( LDC.LT.MAX( 1, M ) ) THEN >*/
216 } else if (*ldc < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*m)) {
217 /*< INFO = -10 >*/
218 *info = -10;
219 /*< END IF >*/
220 }
221 /*< IF( INFO.NE.0 ) THEN >*/
222 if (*info != 0) {
223 /*< CALL XERBLA( 'ZUNM2R', -INFO ) >*/
224 i__1 = -(*info);
225 xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!("ZUNM2R", &i__1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)6);
226 /*< RETURN >*/
227 return 0;
228 /*< END IF >*/
229 }
230
231 /* Quick return if possible */
232
233 /*< >*/
234 if (*m == 0 || *n == 0 || *k == 0) {
235 return 0;
236 }
237
238 /*< IF( ( LEFT .AND. .NOT.NOTRAN .OR. .NOT.LEFT .AND. NOTRAN ) ) THEN >*/
239 if ((left && ! notran) || (! left && notran)) {
240 /*< I1 = 1 >*/
241 i1 = 1;
242 /*< I2 = K >*/
243 i2 = *k;
244 /*< I3 = 1 >*/
245 i3 = 1;
246 /*< ELSE >*/
247 } else {
248 /*< I1 = K >*/
249 i1 = *k;
250 /*< I2 = 1 >*/
251 i2 = 1;
252 /*< I3 = -1 >*/
253 i3 = -1;
254 /*< END IF >*/
255 }
256
257 /*< IF( LEFT ) THEN >*/
258 if (left) {
259 /*< NI = N >*/
260 ni = *n;
261 /*< JC = 1 >*/
262 jc = 1;
263 /*< ELSE >*/
264 } else {
265 /*< MI = M >*/
266 mi = *m;
267 /*< IC = 1 >*/
268 ic = 1;
269 /*< END IF >*/
270 }
271
272 /*< DO 10 I = I1, I2, I3 >*/
273 i__1 = i2;
274 i__2 = i3;
275 for (i__ = i1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
276 /*< IF( LEFT ) THEN >*/
277 if (left) {
278
279 /* H(i) or H(i)' is applied to C(i:m,1:n) */
280
281 /*< MI = M - I + 1 >*/
282 mi = *m - i__ + 1;
283 /*< IC = I >*/
284 ic = i__;
285 /*< ELSE >*/
286 } else {
287
288 /* H(i) or H(i)' is applied to C(1:m,i:n) */
289
290 /*< NI = N - I + 1 >*/
291 ni = *n - i__ + 1;
292 /*< JC = I >*/
293 jc = i__;
294 /*< END IF >*/
295 }
296
297 /* Apply H(i) or H(i)' */
298
299 /*< IF( NOTRAN ) THEN >*/
300 if (notran) {
301 /*< TAUI = TAU( I ) >*/
302 i__3 = i__;
303 taui.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = tau[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., taui.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = tau[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
304 /*< ELSE >*/
305 } else {
306 /*< TAUI = DCONJG( TAU( I ) ) >*/
307 d_cnjgcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:11:9`!(&z__1, &tau[i__]);
308 taui.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., taui.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
309 /*< END IF >*/
310 }
311 /*< AII = A( I, I ) >*/
312 i__3 = i__ + i__ * a_dim1;
313 aii.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., aii.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = a[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
314 /*< A( I, I ) = ONE >*/
315 i__3 = i__ + i__ * a_dim1;
316 a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = 1., a[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = 0.;
317 /*< >*/
318 zlarf_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:328:9`!(side, &mi, &ni, &a[i__ + i__ * a_dim1], &c__1cxx . . $ c__1., &taui, &c__[ic
319 + jc * c_dim1], ldc, &work[1], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
320 /*< A( I, I ) = AII >*/
321 i__3 = i__ + i__ * a_dim1;
322 a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = aii.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., a[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = aii.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.;
323 /*< 10 CONTINUE >*/
324 /* L10: */
325 }
326 /*< RETURN >*/
327 return 0;
328
329 /* End of ZUNM2R */
330
331 /*< END >*/
332 } /* zunm2r_ */
333
334 #ifdef __cplusplus
335 }
336 #endif