Debian Codegraph @

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

raw symbols SCIP
1 /* lapack/complex16/ztgexc.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 /*< >*/
19 /* Subroutine */ int ztgexc_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:354:9`!(logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *wantq, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *wantz, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n,
20 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`! *b, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldb,
21 doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *q, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldq, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *z__, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldz,
22 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ifst, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ilst, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info)
23 {
24 /* System generated locals */
25 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! a_dim1, a_offset, b_dim1, b_offset, q_dim1, q_offset, z_dim1,
26 z_offset, i__1;
27
28 /* Local variables */
29 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! here;
30 extern /* Subroutine */ int ztgex2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:368:9`!(logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
31 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`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
32 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`! *, 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`! *,
33 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63: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`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
34
35
36 /* -- LAPACK routine (version 3.2) -- */
37 /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
38 /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
39 /* November 2006 */
40
41 /* .. Scalar Arguments .. */
42 /*< LOGICAL WANTQ, WANTZ >*/
43 /*< INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N >*/
44 /* .. */
45 /* .. Array Arguments .. */
46 /*< >*/
47 /* .. */
48
49 /* Purpose */
50 /* ======= */
51
52 /* ZTGEXC reorders the generalized Schur decomposition of a complex */
53 /* matrix pair (A,B), using an unitary equivalence transformation */
54 /* (A, B) := Q * (A, B) * Z', so that the diagonal block of (A, B) with */
55 /* row index IFST is moved to row ILST. */
56
57 /* (A, B) must be in generalized Schur canonical form, that is, A and */
58 /* B are both upper triangular. */
59
60 /* Optionally, the matrices Q and Z of generalized Schur vectors are */
61 /* updated. */
62
63 /* Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)' */
64 /* Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)' */
65
66 /* Arguments */
67 /* ========= */
68
69 /* WANTQ (input) LOGICAL */
70 /* .TRUE. : update the left transformation matrix Q; */
71 /* .FALSE.: do not update Q. */
72
73 /* WANTZ (input) LOGICAL */
74 /* .TRUE. : update the right transformation matrix Z; */
75 /* .FALSE.: do not update Z. */
76
77 /* N (input) INTEGER */
78 /* The order of the matrices A and B. N >= 0. */
79
80 /* A (input/output) COMPLEX*16 array, dimension (LDA,N) */
81 /* On entry, the upper triangular matrix A in the pair (A, B). */
82 /* On exit, the updated matrix A. */
83
84 /* LDA (input) INTEGER */
85 /* The leading dimension of the array A. LDA >= max(1,N). */
86
87 /* B (input/output) COMPLEX*16 array, dimension (LDB,N) */
88 /* On entry, the upper triangular matrix B in the pair (A, B). */
89 /* On exit, the updated matrix B. */
90
91 /* LDB (input) INTEGER */
92 /* The leading dimension of the array B. LDB >= max(1,N). */
93
94 /* Q (input/output) COMPLEX*16 array, dimension (LDZ,N) */
95 /* On entry, if WANTQ = .TRUE., the unitary matrix Q. */
96 /* On exit, the updated matrix Q. */
97 /* If WANTQ = .FALSE., Q is not referenced. */
98
99 /* LDQ (input) INTEGER */
100 /* The leading dimension of the array Q. LDQ >= 1; */
101 /* If WANTQ = .TRUE., LDQ >= N. */
102
103 /* Z (input/output) COMPLEX*16 array, dimension (LDZ,N) */
104 /* On entry, if WANTZ = .TRUE., the unitary matrix Z. */
105 /* On exit, the updated matrix Z. */
106 /* If WANTZ = .FALSE., Z is not referenced. */
107
108 /* LDZ (input) INTEGER */
109 /* The leading dimension of the array Z. LDZ >= 1; */
110 /* If WANTZ = .TRUE., LDZ >= N. */
111
112 /* IFST (input) INTEGER */
113 /* ILST (input/output) INTEGER */
114 /* Specify the reordering of the diagonal blocks of (A, B). */
115 /* The block with row index IFST is moved to row ILST, by a */
116 /* sequence of swapping between adjacent blocks. */
117
118 /* INFO (output) INTEGER */
119 /* =0: Successful exit. */
120 /* <0: if INFO = -i, the i-th argument had an illegal value. */
121 /* =1: The transformed matrix pair (A, B) would be too far */
122 /* from generalized Schur form; the problem is ill- */
123 /* conditioned. (A, B) may have been partially reordered, */
124 /* and ILST points to the first row of the current */
125 /* position of the block being moved. */
126
127
128 /* Further Details */
129 /* =============== */
130
131 /* Based on contributions by */
132 /* Bo Kagstrom and Peter Poromaa, Department of Computing Science, */
133 /* Umea University, S-901 87 Umea, Sweden. */
134
135 /* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the */
136 /* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in */
137 /* M.S. Moonen et al (eds), Linear Algebra for Large Scale and */
138 /* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. */
139
140 /* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified */
141 /* Eigenvalues of a Regular Matrix Pair (A, B) and Condition */
142 /* Estimation: Theory, Algorithms and Software, Report */
143 /* UMINF - 94.04, Department of Computing Science, Umea University, */
144 /* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87. */
145 /* To appear in Numerical Algorithms, 1996. */
146
147 /* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software */
148 /* for Solving the Generalized Sylvester Equation and Estimating the */
149 /* Separation between Regular Matrix Pairs, Report UMINF - 93.23, */
150 /* Department of Computing Science, Umea University, S-901 87 Umea, */
151 /* Sweden, December 1993, Revised April 1994, Also as LAPACK working */
152 /* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1, */
153 /* 1996. */
154
155 /* ===================================================================== */
156
157 /* .. Local Scalars .. */
158 /*< INTEGER HERE >*/
159 /* .. */
160 /* .. External Subroutines .. */
161 /*< EXTERNAL XERBLA, ZTGEX2 >*/
162 /* .. */
163 /* .. Intrinsic Functions .. */
164 /*< INTRINSIC MAX >*/
165 /* .. */
166 /* .. Executable Statements .. */
167
168 /* Decode and test input arguments. */
169 /*< INFO = 0 >*/
170 /* Parameter adjustments */
171 a_dim1 = *lda;
172 a_offset = 1 + a_dim1;
173 a -= a_offset;
174 b_dim1 = *ldb;
175 b_offset = 1 + b_dim1;
176 b -= b_offset;
177 q_dim1 = *ldq;
178 q_offset = 1 + q_dim1;
179 q -= q_offset;
180 z_dim1 = *ldz;
181 z_offset = 1 + z_dim1;
182 z__ -= z_offset;
183
184 /* Function Body */
185 *info = 0;
186 /*< IF( N.LT.0 ) THEN >*/
187 if (*n < 0) {
188 /*< INFO = -3 >*/
189 *info = -3;
190 /*< ELSE IF( LDA.LT.MAX( 1, N ) ) THEN >*/
191 } else if (*lda < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*n)) {
192 /*< INFO = -5 >*/
193 *info = -5;
194 /*< ELSE IF( LDB.LT.MAX( 1, N ) ) THEN >*/
195 } else if (*ldb < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*n)) {
196 /*< INFO = -7 >*/
197 *info = -7;
198 /*< ELSE IF( LDQ.LT.1 .OR. WANTQ .AND. ( LDQ.LT.MAX( 1, N ) ) ) THEN >*/
199 } else if (*ldq < 1 || (*wantq && *ldq < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*n))) {
200 /*< INFO = -9 >*/
201 *info = -9;
202 /*< ELSE IF( LDZ.LT.1 .OR. WANTZ .AND. ( LDZ.LT.MAX( 1, N ) ) ) THEN >*/
203 } else if (*ldz < 1 || (*wantz && *ldz < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*n))) {
204 /*< INFO = -11 >*/
205 *info = -11;
206 /*< ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN >*/
207 } else if (*ifst < 1 || *ifst > *n) {
208 /*< INFO = -12 >*/
209 *info = -12;
210 /*< ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN >*/
211 } else if (*ilst < 1 || *ilst > *n) {
212 /*< INFO = -13 >*/
213 *info = -13;
214 /*< END IF >*/
215 }
216 /*< IF( INFO.NE.0 ) THEN >*/
217 if (*info != 0) {
218 /*< CALL XERBLA( 'ZTGEXC', -INFO ) >*/
219 i__1 = -(*info);
220 xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!("ZTGEXC", &i__1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)6);
221 /*< RETURN >*/
222 return 0;
223 /*< END IF >*/
224 }
225
226 /* Quick return if possible */
227
228 /*< >*/
229 if (*n <= 1) {
230 return 0;
231 }
232 /*< >*/
233 if (*ifst == *ilst) {
234 return 0;
235 }
236
237 /*< IF( IFST.LT.ILST ) THEN >*/
238 if (*ifst < *ilst) {
239
240 /*< HERE = IFST >*/
241 here = *ifst;
242
243 /*< 10 CONTINUE >*/
244 L10:
245
246 /* Swap with next one below */
247
248 /*< >*/
249 ztgex2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:368:9`!(wantq, wantz, n, &a[a_offset], lda, &b[b_offset], ldb, &q[
250 q_offset], ldq, &z__[z_offset], ldz, &here, info);
251 /*< IF( INFO.NE.0 ) THEN >*/
252 if (*info != 0) {
253 /*< ILST = HERE >*/
254 *ilst = here;
255 /*< RETURN >*/
256 return 0;
257 /*< END IF >*/
258 }
259 /*< HERE = HERE + 1 >*/
260 ++here;
261 /*< >*/
262 if (here < *ilst) {
263 goto L10;
264 }
265 /*< HERE = HERE - 1 >*/
266 --here;
267 /*< ELSE >*/
268 } else {
269 /*< HERE = IFST - 1 >*/
270 here = *ifst - 1;
271
272 /*< 20 CONTINUE >*/
273 L20:
274
275 /* Swap with next one above */
276
277 /*< >*/
278 ztgex2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:368:9`!(wantq, wantz, n, &a[a_offset], lda, &b[b_offset], ldb, &q[
279 q_offset], ldq, &z__[z_offset], ldz, &here, info);
280 /*< IF( INFO.NE.0 ) THEN >*/
281 if (*info != 0) {
282 /*< ILST = HERE >*/
283 *ilst = here;
284 /*< RETURN >*/
285 return 0;
286 /*< END IF >*/
287 }
288 /*< HERE = HERE - 1 >*/
289 --here;
290 /*< >*/
291 if (here >= *ilst) {
292 goto L20;
293 }
294 /*< HERE = HERE + 1 >*/
295 ++here;
296 /*< END IF >*/
297 }
298 /*< ILST = HERE >*/
299 *ilst = here;
300 /*< RETURN >*/
301 return 0;
302
303 /* End of ZTGEXC */
304
305 /*< END >*/
306 } /* ztgexc_ */
307
308 #ifdef __cplusplus
309 }
310 #endif