-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GSVD with QR factorizations, 2-by-1 CS decomposition #406
base: master
Are you sure you want to change the base?
Add GSVD with QR factorizations, 2-by-1 CS decomposition #406
Commits on Apr 20, 2021
-
Add GSVD solver based on QR, CS decompositions
(double precision real only)
Configuration menu - View commit details
-
Copy full SHA for fd5e74e - Browse repository at this point
Copy the full SHA fd5e74eView commit details -
- add file to CMakeLists.txt - fix syntax errors etc.
Configuration menu - View commit details
-
Copy full SHA for 63ce490 - Browse repository at this point
Copy the full SHA 63ce490View commit details -
- workspace queries are signalled by LWORK=-1, not INFO=-1 - fix undeclared, uninitialized variable errors
Configuration menu - View commit details
-
Copy full SHA for 96dccdf - Browse repository at this point
Copy the full SHA 96dccdfView commit details -
- fix workspace queries - fix DORCSD2BY1 parameter containing the number of rows of X11 - avoid scaling the matrix B if B is zero - handle the case where both matrices A, B are zero - check INFO after calling DORGQR
Configuration menu - View commit details
-
Copy full SHA for 1e815ee - Browse repository at this point
Copy the full SHA 1e815eeView commit details -
Fix matrix computation in DGGQRCS
Fix the computation of an n-by-n orthogonal matrix Q by DORGRQ by ensuring that the R elementary reflectors from DGERQF can be found in the last R rows of Q.
Configuration menu - View commit details
-
Copy full SHA for ace0611 - Browse repository at this point
Copy the full SHA ace0611View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bb8054 - Browse repository at this point
Copy the full SHA 4bb8054View commit details -
DGGQRCS: ensure #columns <= #rows with DORCSD2BY1
Ensure the number of columns indicated to DORCSD2BY1 is less than or equal to the number of rows during workspace queries.
Configuration menu - View commit details
-
Copy full SHA for 32622a6 - Browse repository at this point
Copy the full SHA 32622a6View commit details -
Fix completely broken DGGQRCS matrix scaling
The variable FACTOR was copy-pasted from xGEEQUB.
Configuration menu - View commit details
-
Copy full SHA for 1750e47 - Browse repository at this point
Copy the full SHA 1750e47View commit details -
- compute Q only when needed - fix argument order to DORCSD2BY1
Configuration menu - View commit details
-
Copy full SHA for fbf90a0 - Browse repository at this point
Copy the full SHA fbf90a0View commit details -
Use 1-based indexing in DGGQRCS
DLANGE does not use WORK when computing the Frobenius norm. Nevertheless, this change may avoid future bugs.
Configuration menu - View commit details
-
Copy full SHA for fd8c487 - Browse repository at this point
Copy the full SHA fd8c487View commit details -
DGGQRCS: always return optimal workspace
Return the optimal workspace size even if both matrices A, B are zero.
Configuration menu - View commit details
-
Copy full SHA for 7c89211 - Browse repository at this point
Copy the full SHA 7c89211View commit details -
Configuration menu - View commit details
-
Copy full SHA for d58326f - Browse repository at this point
Copy the full SHA d58326fView commit details -
DGGQRCS: compute V^T R1( 1:RANK, : ) correctly
The multiplication uses DGEMM so the lower triangular part of R1( 1:RANK, : ) must be set to zero.
Configuration menu - View commit details
-
Copy full SHA for b35fd6c - Browse repository at this point
Copy the full SHA b35fd6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d8da3a - Browse repository at this point
Copy the full SHA 2d8da3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c83b37 - Browse repository at this point
Copy the full SHA 2c83b37View commit details -
DGGQRCS: fix argument to DLACPY
This bug was introduced in commit 446ac9a2.
Configuration menu - View commit details
-
Copy full SHA for 436931e - Browse repository at this point
Copy the full SHA 436931eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 094c302 - Browse repository at this point
Copy the full SHA 094c302View commit details -
DGGQRCS: fix triangular matrices copies again
This bug was discovered by the random test from commit dcd04cd. Minimal triggering example with m=1, n=2, p=1 with non-random entries: A = [1, 1], B = [1, 0].
Configuration menu - View commit details
-
Copy full SHA for a25860a - Browse repository at this point
Copy the full SHA a25860aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e7e677 - Browse repository at this point
Copy the full SHA 1e7e677View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81a282b - Browse repository at this point
Copy the full SHA 81a282bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 957e217 - Browse repository at this point
Copy the full SHA 957e217View commit details -
Configuration menu - View commit details
-
Copy full SHA for f683c79 - Browse repository at this point
Copy the full SHA f683c79View commit details -
Fix harmless out-of-bounds accesses for ASAN
Fix harmless out-of-bounds accesses to avoid spurious address sanitizer (ASAN) failures.
Configuration menu - View commit details
-
Copy full SHA for 8e30cd1 - Browse repository at this point
Copy the full SHA 8e30cd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for fffae5f - Browse repository at this point
Copy the full SHA fffae5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f0080a - Browse repository at this point
Copy the full SHA 4f0080aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 706d952 - Browse repository at this point
Copy the full SHA 706d952View commit details -
* fix typos * explain optimal workspace size computation
Configuration menu - View commit details
-
Copy full SHA for 5110d92 - Browse repository at this point
Copy the full SHA 5110d92View commit details -
* fix an argument type * fix name of called function
Configuration menu - View commit details
-
Copy full SHA for 9944790 - Browse repository at this point
Copy the full SHA 9944790View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7caf824 - Browse repository at this point
Copy the full SHA 7caf824View commit details -
xGGQRCS: remove integer variable
R
Remove integer variable `R` indicating the rank because * integer `L` was already introduced for this purpose * the purpose of `R` was never documented, and * it can be confused with the triangular matrices occuring throghout the computation.
Configuration menu - View commit details
-
Copy full SHA for fe9ee05 - Browse repository at this point
Copy the full SHA fe9ee05View commit details -
CGGQRCS: fix LRWORK computation
For CUNCSD2BY1, memory consumption is not at maximum with maximum matrix dimensions.
Configuration menu - View commit details
-
Copy full SHA for c9e5167 - Browse repository at this point
Copy the full SHA c9e5167View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a55ab9 - Browse repository at this point
Copy the full SHA 2a55ab9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bb2c51 - Browse repository at this point
Copy the full SHA 3bb2c51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 087875f - Browse repository at this point
Copy the full SHA 087875fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f307f6 - Browse repository at this point
Copy the full SHA 5f307f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5121631 - Browse repository at this point
Copy the full SHA 5121631View commit details -
Configuration menu - View commit details
-
Copy full SHA for 846a97a - Browse repository at this point
Copy the full SHA 846a97aView commit details -
SGGQRCS: fix generalized singular values
In an attempt to avoid a large backward error, xGGQRCS scales on of the input matrices so that both input matrices have comparable norm. This changes (not perturb, changes!) the generalized singular values. The previously committed test focusing on the singular values computed by xGGQRCS highlighted the need to fix the singular values. With this commit, it became obvious that * the singular values can be computed to very high relative accuracy (small forward error), * the matrices computed by xGGQRCS change significantly with scaling (large backward error). Consequently, matrix scaling cannot be used and row sorting must be applied to the matrix `(A, B)` before the initial QR decomposition.
Configuration menu - View commit details
-
Copy full SHA for bf66250 - Browse repository at this point
Copy the full SHA bf66250View commit details
Commits on Apr 21, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 366de5e - Browse repository at this point
Copy the full SHA 366de5eView commit details -
Add SLASRTI sorting indices based on numbers
xLASRT sorts an array of real values. xLASRTI sorts an array of indices referencing real values in an array. SLASRTI is based on SLASRT.
Configuration menu - View commit details
-
Copy full SHA for 0f06a18 - Browse repository at this point
Copy the full SHA 0f06a18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29d3e3b - Browse repository at this point
Copy the full SHA 29d3e3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e512db - Browse repository at this point
Copy the full SHA 1e512dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a238a65 - Browse repository at this point
Copy the full SHA a238a65View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cc4495 - Browse repository at this point
Copy the full SHA 7cc4495View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bd430d - Browse repository at this point
Copy the full SHA 3bd430dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae68646 - Browse repository at this point
Copy the full SHA ae68646View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb7f37e - Browse repository at this point
Copy the full SHA eb7f37eView commit details -
Configuration menu - View commit details
-
Copy full SHA for aaaf98c - Browse repository at this point
Copy the full SHA aaaf98cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb2c0b9 - Browse repository at this point
Copy the full SHA bb2c0b9View commit details -
The indexing error could lead to an infinite loop.
Configuration menu - View commit details
-
Copy full SHA for b954151 - Browse repository at this point
Copy the full SHA b954151View commit details -
SGGQRCS: do not factor right-hand side GSVD matrix
The GSVD decomposes a pair of matrices A, B into * `A = U1 D1 X`, * `B = U2 D2 X`, where `X` has full rank. Alternatively, one can compute the equivalent decomposition * `A = U1 D1 R Q^*`, * `B = U2 D2 R Q^*`, where `R` is upper triangular and `Q` orthogonal. The second form has several advantages from the point of view of _numerical_ linear algebra. None of these apply to the GSVD solvers based on QR and CS decomposition. Consequently, xGGQRCS returns from now on only the product `X = RQ^*`. This change makes xGGQRCS * faster, * more flexible (`X` is computed or not), * easier to implement (no need to assemble `R Q^*` for tests), and * numerically stable! xGGQRCS becomes numerically stable because factoring `X` requires an explicit LQ decomposition but the result may not be backward stable unless `A` and `B` are similar in norm. Not computing the LQ decomposition obviously solves this problem. This commit is a proof-of-concept; {d,c,z}GGQRCS should be updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for eefd3a7 - Browse repository at this point
Copy the full SHA eefd3a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22735c9 - Browse repository at this point
Copy the full SHA 22735c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a6b92b - Browse repository at this point
Copy the full SHA 3a6b92bView commit details -
SGGQRCS: replace matrix scaling with row sorting
To achieve a backward stable solver, input matrices A, B were previously scaled to be similar norm but this changes the generalized singular values and I seem unable to compensate for the scaling effects by * recomputing the singular values and * rescaling the right-hand side GSVD matrix X.
Configuration menu - View commit details
-
Copy full SHA for d7e01db - Browse repository at this point
Copy the full SHA d7e01dbView commit details -
Revert "SGGQRCS: replace matrix scaling with row sorting"
Row sorting cannot replace matrix scaling, see the recently added tests.
Configuration menu - View commit details
-
Copy full SHA for 84cb49d - Browse repository at this point
Copy the full SHA 84cb49dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2678b0f - Browse repository at this point
Copy the full SHA 2678b0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 19a1e0b - Browse repository at this point
Copy the full SHA 19a1e0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b17648c - Browse repository at this point
Copy the full SHA b17648cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32ebe2b - Browse repository at this point
Copy the full SHA 32ebe2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 357a5b9 - Browse repository at this point
Copy the full SHA 357a5b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69e0e6b - Browse repository at this point
Copy the full SHA 69e0e6bView commit details -
SGGQRCS: fix row scaling with singular value zero
The singular value will not change but the corresponding row in the right-hand side GSVD matrix X must be scaled.
Configuration menu - View commit details
-
Copy full SHA for f3e4a2d - Browse repository at this point
Copy the full SHA f3e4a2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20c578d - Browse repository at this point
Copy the full SHA 20c578dView commit details -
SGGQRCS: improve documentation
* highlight conditional backward stability * recommend use of SGGSVD3 when necessary * emphasize accuracy of computed singular values
Configuration menu - View commit details
-
Copy full SHA for 060d77c - Browse repository at this point
Copy the full SHA 060d77cView commit details -
Row sorting has no discernible effect on forward or backward errors.
Configuration menu - View commit details
-
Copy full SHA for dc2f5e0 - Browse repository at this point
Copy the full SHA dc2f5e0View commit details -
SGGQRCS: ensure matrix scaling factors always >1
The singular values must be corrected for matrix scaling. Let w be a power of two such that norm(wA) equals approximately norm(B). Then the radians representation of the singular values must corrected with x' = arctan(w * tan(x)), where x is the computed radians value with matrix scaling and x' is the computed radians value without matrix scaling. If w is less than one and if x is large (close to pi/2), then roughly speaking * tan(x) has a large derivative (i.e. it is badly conditioned), * w * tan(x) will be smaller than tan(x), * arctan(w * tan(x)) has derivative near one, because its argument is closer to zero. This commit modifies the GSVD computation such that w >= 1 by choosing to compute the GSVD of (A, B) or (B, A) depending on the relative norms. Then * tan(x) has a small derivative if x is sufficiently small, * arctan(w * tan(x)) has derivative near zero, and * if x is large (near pi/2), then x' will be near pi/2 as well. This commit fixes the large relative forward errors detected by xGGQRCS_test_singular_values<float>' when the singular values of the matrix pair (A,B) where drawn from [0, pi/2000).
Configuration menu - View commit details
-
Copy full SHA for 676f894 - Browse repository at this point
Copy the full SHA 676f894View commit details -
SGGQRCS: return sine, cosine values
Previously SGGQRCS returned angles instead of sine, cosine values but these computations (while numerically stable) may completely destroy the backward stability of the solver. Specifically, in one test* a computed angle x near π/2 was the best single-precision approximation to the true value but cosine(x) was nowhere near the true cosine value, thereby making it impossible to achieve a backward stable reassembly of the input matrices from the GSVD. For this reason, SGGQRCS returns sine and cosine values to the caller instead of angles. TODO: Documentation *Test name xGGQRCS_test_singular_accuracy_vs_radians_accuracy
Configuration menu - View commit details
-
Copy full SHA for b5eb358 - Browse repository at this point
Copy the full SHA b5eb358View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4202857 - Browse repository at this point
Copy the full SHA 4202857View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e5c3a6 - Browse repository at this point
Copy the full SHA 6e5c3a6View commit details -
DGGQRCS: update implementation
Port the most recent SGGQRCS code to double precision.
Configuration menu - View commit details
-
Copy full SHA for 29eff1b - Browse repository at this point
Copy the full SHA 29eff1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ea6b975 - Browse repository at this point
Copy the full SHA ea6b975View commit details -
CGGQRCS: update implementation
Port the most recent SGGQRCS code to single-precision complex.
Configuration menu - View commit details
-
Copy full SHA for dbae805 - Browse repository at this point
Copy the full SHA dbae805View commit details -
ZGGQRCS: update implementation
Port the most recent CGGQRCS code to double-precision complex.
Configuration menu - View commit details
-
Copy full SHA for 02cc14d - Browse repository at this point
Copy the full SHA 02cc14dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b0f2ac - Browse repository at this point
Copy the full SHA 3b0f2acView commit details -
SGGQRCS: try speeding up matrix multiplication
For tall matrices, xGGSVD3 is faster than xGGQRCS. This commit tries to improve performance by speeding up the matrix-matrix multiplication `V^* R( 1:L, N )`, where `R` is upper triangular with, with `xTRMM()`.
Configuration menu - View commit details
-
Copy full SHA for 762ef54 - Browse repository at this point
Copy the full SHA 762ef54View commit details -
Revert "SGGQRCS: try speeding up matrix multiplication"
Revert because * the commit was incomplete and forgot to remove the superfluous SLASCL call zeroing the lower triangular matrix part; with this called removed... * there is hardly any difference for matrices with m, n, p <= 256, * if there is a difference, it may be in favor of xGEMM.
Configuration menu - View commit details
-
Copy full SHA for 1593ed7 - Browse repository at this point
Copy the full SHA 1593ed7View commit details -
xGGQRCS: fix out-of-bounds access
Fix out-of-bounds access when computing only the singular values.
Configuration menu - View commit details
-
Copy full SHA for baf0f41 - Browse repository at this point
Copy the full SHA baf0f41View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9ca9b6 - Browse repository at this point
Copy the full SHA b9ca9b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a61fa4 - Browse repository at this point
Copy the full SHA 0a61fa4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58f2a5b - Browse repository at this point
Copy the full SHA 58f2a5bView commit details -
The last element of the matrix X overlapped with the first element of the matrix V^* because WORK(1) cannot be used by X.
Configuration menu - View commit details
-
Copy full SHA for dda1d0f - Browse repository at this point
Copy the full SHA dda1d0fView commit details -
ZGGQRCS: fix accidental memory allocation
This commit is a port of recent changes mades to CGGQRCS.
Configuration menu - View commit details
-
Copy full SHA for 702991a - Browse repository at this point
Copy the full SHA 702991aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a6a0f8 - Browse repository at this point
Copy the full SHA 4a6a0f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 332b4e6 - Browse repository at this point
Copy the full SHA 332b4e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2652e1f - Browse repository at this point
Copy the full SHA 2652e1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42f9910 - Browse repository at this point
Copy the full SHA 42f9910View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1358ca - Browse repository at this point
Copy the full SHA f1358caView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd80228 - Browse repository at this point
Copy the full SHA bd80228View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24fc861 - Browse repository at this point
Copy the full SHA 24fc861View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f267f1 - Browse repository at this point
Copy the full SHA 3f267f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 305afaf - Browse repository at this point
Copy the full SHA 305afafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 224c527 - Browse repository at this point
Copy the full SHA 224c527View commit details -
xGGRCS: documentation improvements
* fix typos * remove spurious direction value for an internal variable * fix formatting of internal variables section
Configuration menu - View commit details
-
Copy full SHA for 0298da0 - Browse repository at this point
Copy the full SHA 0298da0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cb8736 - Browse repository at this point
Copy the full SHA 3cb8736View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b48881 - Browse repository at this point
Copy the full SHA 5b48881View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f23fbd - Browse repository at this point
Copy the full SHA 9f23fbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a8c4dd - Browse repository at this point
Copy the full SHA 2a8c4ddView commit details
Commits on Apr 22, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 48d8488 - Browse repository at this point
Copy the full SHA 48d8488View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cb9a5f - Browse repository at this point
Copy the full SHA 6cb9a5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e805767 - Browse repository at this point
Copy the full SHA e805767View commit details -
xGGQRCS: ensure leading dimension is at least one
Ensure the leading dimension of the assembled matrix `G = [A; B]` is always at least one.
Configuration menu - View commit details
-
Copy full SHA for 8a0bef1 - Browse repository at this point
Copy the full SHA 8a0bef1View commit details