1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
|
---
:name: sggsvp
:md5sum: 8f9fa51bd57835c14e5543a88bb2b821
:category: :subroutine
:arguments:
- jobu:
:type: char
:intent: input
- jobv:
:type: char
:intent: input
- jobq:
:type: char
:intent: input
- m:
:type: integer
:intent: input
- p:
:type: integer
:intent: input
- n:
:type: integer
:intent: input
- a:
:type: real
:intent: input/output
:dims:
- lda
- n
- lda:
:type: integer
:intent: input
- b:
:type: real
:intent: input/output
:dims:
- ldb
- n
- ldb:
:type: integer
:intent: input
- tola:
:type: real
:intent: input
- tolb:
:type: real
:intent: input
- k:
:type: integer
:intent: output
- l:
:type: integer
:intent: output
- u:
:type: real
:intent: output
:dims:
- ldu
- m
- ldu:
:type: integer
:intent: input
- v:
:type: real
:intent: output
:dims:
- ldv
- p
- ldv:
:type: integer
:intent: input
- q:
:type: real
:intent: output
:dims:
- ldq
- n
- ldq:
:type: integer
:intent: input
- iwork:
:type: integer
:intent: workspace
:dims:
- n
- tau:
:type: real
:intent: workspace
:dims:
- n
- work:
:type: real
:intent: workspace
:dims:
- MAX(MAX(3*n,m),p)
- info:
:type: integer
:intent: output
:substitutions:
m: lda
p: ldb
ldq: "lsame_(&jobq,\"Q\") ? MAX(1,n) : 1"
ldu: "lsame_(&jobu,\"U\") ? MAX(1,m) : 1"
ldv: "lsame_(&jobv,\"V\") ? MAX(1,p) : 1"
:fortran_help: " SUBROUTINE SGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB, TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ, IWORK, TAU, WORK, INFO )\n\n\
* Purpose\n\
* =======\n\
*\n\
* SGGSVP computes orthogonal matrices U, V and Q such that\n\
*\n\
* N-K-L K L\n\
* U'*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;\n\
* L ( 0 0 A23 )\n\
* M-K-L ( 0 0 0 )\n\
*\n\
* N-K-L K L\n\
* = K ( 0 A12 A13 ) if M-K-L < 0;\n\
* M-K ( 0 0 A23 )\n\
*\n\
* N-K-L K L\n\
* V'*B*Q = L ( 0 0 B13 )\n\
* P-L ( 0 0 0 )\n\
*\n\
* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular\n\
* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,\n\
* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective\n\
* numerical rank of the (M+P)-by-N matrix (A',B')'. Z' denotes the\n\
* transpose of Z.\n\
*\n\
* This decomposition is the preprocessing step for computing the\n\
* Generalized Singular Value Decomposition (GSVD), see subroutine\n\
* SGGSVD.\n\
*\n\n\
* Arguments\n\
* =========\n\
*\n\
* JOBU (input) CHARACTER*1\n\
* = 'U': Orthogonal matrix U is computed;\n\
* = 'N': U is not computed.\n\
*\n\
* JOBV (input) CHARACTER*1\n\
* = 'V': Orthogonal matrix V is computed;\n\
* = 'N': V is not computed.\n\
*\n\
* JOBQ (input) CHARACTER*1\n\
* = 'Q': Orthogonal matrix Q is computed;\n\
* = 'N': Q is not computed.\n\
*\n\
* M (input) INTEGER\n\
* The number of rows of the matrix A. M >= 0.\n\
*\n\
* P (input) INTEGER\n\
* The number of rows of the matrix B. P >= 0.\n\
*\n\
* N (input) INTEGER\n\
* The number of columns of the matrices A and B. N >= 0.\n\
*\n\
* A (input/output) REAL array, dimension (LDA,N)\n\
* On entry, the M-by-N matrix A.\n\
* On exit, A contains the triangular (or trapezoidal) matrix\n\
* described in the Purpose section.\n\
*\n\
* LDA (input) INTEGER\n\
* The leading dimension of the array A. LDA >= max(1,M).\n\
*\n\
* B (input/output) REAL array, dimension (LDB,N)\n\
* On entry, the P-by-N matrix B.\n\
* On exit, B contains the triangular matrix described in\n\
* the Purpose section.\n\
*\n\
* LDB (input) INTEGER\n\
* The leading dimension of the array B. LDB >= max(1,P).\n\
*\n\
* TOLA (input) REAL\n\
* TOLB (input) REAL\n\
* TOLA and TOLB are the thresholds to determine the effective\n\
* numerical rank of matrix B and a subblock of A. Generally,\n\
* they are set to\n\
* TOLA = MAX(M,N)*norm(A)*MACHEPS,\n\
* TOLB = MAX(P,N)*norm(B)*MACHEPS.\n\
* The size of TOLA and TOLB may affect the size of backward\n\
* errors of the decomposition.\n\
*\n\
* K (output) INTEGER\n\
* L (output) INTEGER\n\
* On exit, K and L specify the dimension of the subblocks\n\
* described in Purpose.\n\
* K + L = effective numerical rank of (A',B')'.\n\
*\n\
* U (output) REAL array, dimension (LDU,M)\n\
* If JOBU = 'U', U contains the orthogonal matrix U.\n\
* If JOBU = 'N', U is not referenced.\n\
*\n\
* LDU (input) INTEGER\n\
* The leading dimension of the array U. LDU >= max(1,M) if\n\
* JOBU = 'U'; LDU >= 1 otherwise.\n\
*\n\
* V (output) REAL array, dimension (LDV,P)\n\
* If JOBV = 'V', V contains the orthogonal matrix V.\n\
* If JOBV = 'N', V is not referenced.\n\
*\n\
* LDV (input) INTEGER\n\
* The leading dimension of the array V. LDV >= max(1,P) if\n\
* JOBV = 'V'; LDV >= 1 otherwise.\n\
*\n\
* Q (output) REAL array, dimension (LDQ,N)\n\
* If JOBQ = 'Q', Q contains the orthogonal matrix Q.\n\
* If JOBQ = 'N', Q is not referenced.\n\
*\n\
* LDQ (input) INTEGER\n\
* The leading dimension of the array Q. LDQ >= max(1,N) if\n\
* JOBQ = 'Q'; LDQ >= 1 otherwise.\n\
*\n\
* IWORK (workspace) INTEGER array, dimension (N)\n\
*\n\
* TAU (workspace) REAL array, dimension (N)\n\
*\n\
* WORK (workspace) REAL array, dimension (max(3*N,M,P))\n\
*\n\
* INFO (output) INTEGER\n\
* = 0: successful exit\n\
* < 0: if INFO = -i, the i-th argument had an illegal value.\n\
*\n\
*\n\n\
* Further Details\n\
* ===============\n\
*\n\
* The subroutine uses LAPACK subroutine SGEQPF for the QR factorization\n\
* with column pivoting to detect the effective numerical rank of the\n\
* a matrix. It may be replaced by a better rank determination strategy.\n\
*\n\
* =====================================================================\n\
*\n"
|