| 1 | /* lapack/complex16/zung2r.f -- translated by f2c (version 20050501). |
| 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 | /*< SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO ) >*/ |
| 23 | /* Subroutine */ int zung2r_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:346: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, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *k, |
| 24 | 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, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! * |
| 25 | work, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info) |
| 26 | { |
| 27 | /* System generated locals */ |
| 28 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! a_dim1, a_offset, i__1, i__2, i__3; |
| 29 | doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! z__1; |
| 30 | |
| 31 | /* Local variables */ |
| 32 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, j, l; |
| 33 | extern /* Subroutine */ int zscal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:339: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`! *, |
| 34 | 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`! *), 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`! *, |
| 35 | 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`! *, |
| 36 | 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`! *, |
| 37 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 38 | |
| 39 | |
| 40 | /* -- LAPACK routine (version 3.0) -- */ |
| 41 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 42 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 43 | /* September 30, 1994 */ |
| 44 | |
| 45 | /* .. Scalar Arguments .. */ |
| 46 | /*< INTEGER INFO, K, LDA, M, N >*/ |
| 47 | /* .. */ |
| 48 | /* .. Array Arguments .. */ |
| 49 | /*< COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) >*/ |
| 50 | /* .. */ |
| 51 | |
| 52 | /* Purpose */ |
| 53 | /* ======= */ |
| 54 | |
| 55 | /* ZUNG2R generates an m by n complex matrix Q with orthonormal columns, */ |
| 56 | /* which is defined as the first n columns of a product of k elementary */ |
| 57 | /* reflectors of order m */ |
| 58 | |
| 59 | /* Q = H(1) H(2) . . . H(k) */ |
| 60 | |
| 61 | /* as returned by ZGEQRF. */ |
| 62 | |
| 63 | /* Arguments */ |
| 64 | /* ========= */ |
| 65 | |
| 66 | /* M (input) INTEGER */ |
| 67 | /* The number of rows of the matrix Q. M >= 0. */ |
| 68 | |
| 69 | /* N (input) INTEGER */ |
| 70 | /* The number of columns of the matrix Q. M >= N >= 0. */ |
| 71 | |
| 72 | /* K (input) INTEGER */ |
| 73 | /* The number of elementary reflectors whose product defines the */ |
| 74 | /* matrix Q. N >= K >= 0. */ |
| 75 | |
| 76 | /* A (input/output) COMPLEX*16 array, dimension (LDA,N) */ |
| 77 | /* On entry, the i-th column must contain the vector which */ |
| 78 | /* defines the elementary reflector H(i), for i = 1,2,...,k, as */ |
| 79 | /* returned by ZGEQRF in the first k columns of its array */ |
| 80 | /* argument A. */ |
| 81 | /* On exit, the m by n matrix Q. */ |
| 82 | |
| 83 | /* LDA (input) INTEGER */ |
| 84 | /* The first dimension of the array A. LDA >= max(1,M). */ |
| 85 | |
| 86 | /* TAU (input) COMPLEX*16 array, dimension (K) */ |
| 87 | /* TAU(i) must contain the scalar factor of the elementary */ |
| 88 | /* reflector H(i), as returned by ZGEQRF. */ |
| 89 | |
| 90 | /* WORK (workspace) COMPLEX*16 array, dimension (N) */ |
| 91 | |
| 92 | /* INFO (output) INTEGER */ |
| 93 | /* = 0: successful exit */ |
| 94 | /* < 0: if INFO = -i, the i-th argument has an illegal value */ |
| 95 | |
| 96 | /* ===================================================================== */ |
| 97 | |
| 98 | /* .. Parameters .. */ |
| 99 | /*< COMPLEX*16 ONE, ZERO >*/ |
| 100 | /*< >*/ |
| 101 | /* .. */ |
| 102 | /* .. Local Scalars .. */ |
| 103 | /*< INTEGER I, J, L >*/ |
| 104 | /* .. */ |
| 105 | /* .. External Subroutines .. */ |
| 106 | /*< EXTERNAL XERBLA, ZLARF, ZSCAL >*/ |
| 107 | /* .. */ |
| 108 | /* .. Intrinsic Functions .. */ |
| 109 | /*< INTRINSIC MAX >*/ |
| 110 | /* .. */ |
| 111 | /* .. Executable Statements .. */ |
| 112 | |
| 113 | /* Test the input arguments */ |
| 114 | |
| 115 | /*< INFO = 0 >*/ |
| 116 | /* Parameter adjustments */ |
| 117 | a_dim1 = *lda; |
| 118 | a_offset = 1 + a_dim1; |
| 119 | a -= a_offset; |
| 120 | --tau; |
| 121 | --work; |
| 122 | |
| 123 | /* Function Body */ |
| 124 | *info = 0; |
| 125 | /*< IF( M.LT.0 ) THEN >*/ |
| 126 | if (*m < 0) { |
| 127 | /*< INFO = -1 >*/ |
| 128 | *info = -1; |
| 129 | /*< ELSE IF( N.LT.0 .OR. N.GT.M ) THEN >*/ |
| 130 | } else if (*n < 0 || *n > *m) { |
| 131 | /*< INFO = -2 >*/ |
| 132 | *info = -2; |
| 133 | /*< ELSE IF( K.LT.0 .OR. K.GT.N ) THEN >*/ |
| 134 | } else if (*k < 0 || *k > *n) { |
| 135 | /*< INFO = -3 >*/ |
| 136 | *info = -3; |
| 137 | /*< ELSE IF( LDA.LT.MAX( 1, M ) ) THEN >*/ |
| 138 | } else if (*lda < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*m)) { |
| 139 | /*< INFO = -5 >*/ |
| 140 | *info = -5; |
| 141 | /*< END IF >*/ |
| 142 | } |
| 143 | /*< IF( INFO.NE.0 ) THEN >*/ |
| 144 | if (*info != 0) { |
| 145 | /*< CALL XERBLA( 'ZUNG2R', -INFO ) >*/ |
| 146 | i__1 = -(*info); |
| 147 | xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!("ZUNG2R", &i__1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)6); |
| 148 | /*< RETURN >*/ |
| 149 | return 0; |
| 150 | /*< END IF >*/ |
| 151 | } |
| 152 | |
| 153 | /* Quick return if possible */ |
| 154 | |
| 155 | /*< >*/ |
| 156 | if (*n <= 0) { |
| 157 | return 0; |
| 158 | } |
| 159 | |
| 160 | /* Initialise columns k+1:n to columns of the unit matrix */ |
| 161 | |
| 162 | /*< DO 20 J = K + 1, N >*/ |
| 163 | i__1 = *n; |
| 164 | for (j = *k + 1; j <= i__1; ++j) { |
| 165 | /*< DO 10 L = 1, M >*/ |
| 166 | i__2 = *m; |
| 167 | for (l = 1; l <= i__2; ++l) { |
| 168 | /*< A( L, J ) = ZERO >*/ |
| 169 | i__3 = l + j * a_dim1; |
| 170 | a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = 0., a[i__3].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = 0.; |
| 171 | /*< 10 CONTINUE >*/ |
| 172 | /* L10: */ |
| 173 | } |
| 174 | /*< A( J, J ) = ONE >*/ |
| 175 | i__2 = j + j * a_dim1; |
| 176 | a[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = 1., a[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = 0.; |
| 177 | /*< 20 CONTINUE >*/ |
| 178 | /* L20: */ |
| 179 | } |
| 180 | |
| 181 | /*< DO 40 I = K, 1, -1 >*/ |
| 182 | for (i__ = *k; i__ >= 1; --i__) { |
| 183 | |
| 184 | /* Apply H(i) to A(i:m,i:n) from the left */ |
| 185 | |
| 186 | /*< IF( I.LT.N ) THEN >*/ |
| 187 | if (i__ < *n) { |
| 188 | /*< A( I, I ) = ONE >*/ |
| 189 | i__1 = i__ + i__ * a_dim1; |
| 190 | a[i__1].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = 1., a[i__1].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = 0.; |
| 191 | /*< >*/ |
| 192 | i__1 = *m - i__ + 1; |
| 193 | i__2 = *n - i__; |
| 194 | zlarf_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:328:9`!("Left", &i__1, &i__2, &a[i__ + i__ * a_dim1], &c__1cxx . . $ c__1., &tau[ |
| 195 | i__], &a[i__ + (i__ + 1) * a_dim1], lda, &work[1], ( |
| 196 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)4); |
| 197 | /*< END IF >*/ |
| 198 | } |
| 199 | /*< >*/ |
| 200 | if (i__ < *m) { |
| 201 | i__1 = *m - i__; |
| 202 | i__2 = i__; |
| 203 | z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = -tau[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = -tau[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.; |
| 204 | zscal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:339:9`!(&i__1, &z__1, &a[i__ + 1 + i__ * a_dim1], &c__1cxx . . $ c__1.); |
| 205 | } |
| 206 | /*< A( I, I ) = ONE - TAU( I ) >*/ |
| 207 | i__1 = i__ + i__ * a_dim1; |
| 208 | i__2 = i__; |
| 209 | z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = 1. - tau[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = 0. - tau[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.; |
| 210 | a[i__1].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = z__1.rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., a[i__1].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = z__1.icxx . . $ $anonymous_type_ec17f80a666933f6_1#i.; |
| 211 | |
| 212 | /* Set A(1:i-1,i) to zero */ |
| 213 | |
| 214 | /*< DO 30 L = 1, I - 1 >*/ |
| 215 | i__1 = i__ - 1; |
| 216 | for (l = 1; l <= i__1; ++l) { |
| 217 | /*< A( L, I ) = ZERO >*/ |
| 218 | i__2 = l + i__ * a_dim1; |
| 219 | a[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. = 0., a[i__2].icxx . . $ $anonymous_type_ec17f80a666933f6_1#i. = 0.; |
| 220 | /*< 30 CONTINUE >*/ |
| 221 | /* L30: */ |
| 222 | } |
| 223 | /*< 40 CONTINUE >*/ |
| 224 | /* L40: */ |
| 225 | } |
| 226 | /*< RETURN >*/ |
| 227 | return 0; |
| 228 | |
| 229 | /* End of ZUNG2R */ |
| 230 | |
| 231 | /*< END >*/ |
| 232 | } /* zung2r_ */ |
| 233 | |
| 234 | #ifdef __cplusplus |
| 235 | } |
| 236 | #endif |