Skip to content

Commit

Permalink
xGGQRCS: ensure leading dimension is at least one
Browse files Browse the repository at this point in the history
Ensure the leading dimension of the assembled matrix `G = [A; B]` is
always at least one.
  • Loading branch information
christoph-conrads committed Apr 22, 2021
1 parent e805767 commit 8a0bef1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion SRC/cggqrcs.f
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ RECURSIVE SUBROUTINE CGGQRCS( JOBU1, JOBU2, JOBX, M, N, P, L,
*
SWAPPED = .FALSE.
L = 0
LDG = M + P
* The leading dimension must never be zero
LDG = MAX( M + P, 1 )
LDVT = N
LMAX = MIN( M + P, N )
IG = 1
Expand Down
3 changes: 2 additions & 1 deletion SRC/dggqrcs.f
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ RECURSIVE SUBROUTINE DGGQRCS( JOBU1, JOBU2, JOBX, M, N, P, L,
*
SWAPPED = .FALSE.
L = 0
LDG = M + P
* The leading dimension must never be zero
LDG = MAX( M + P, 1 )
LDVT = N
LMAX = MIN( M + P, N )
IG = 1
Expand Down
3 changes: 2 additions & 1 deletion SRC/sggqrcs.f
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ RECURSIVE SUBROUTINE SGGQRCS( JOBU1, JOBU2, JOBX, M, N, P, L,
*
SWAPPED = .FALSE.
L = 0
LDG = M + P
* The leading dimension must never be zero
LDG = MAX( M + P, 1 )
LDVT = N
LMAX = MIN( M + P, N )
IG = 1
Expand Down
3 changes: 2 additions & 1 deletion SRC/zggqrcs.f
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ RECURSIVE SUBROUTINE ZGGQRCS( JOBU1, JOBU2, JOBX, M, N, P, L,
*
SWAPPED = .FALSE.
L = 0
LDG = M + P
* The leading dimension must never be zero
LDG = MAX( M + P, 1 )
LDVT = N
LMAX = MIN( M + P, N )
IG = 1
Expand Down

0 comments on commit 8a0bef1

Please sign in to comment.