Skip to content
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

xGELSD changes July 2024 #1037

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SRC/cgelsd.f
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ SUBROUTINE CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
*
* Quick return if possible.
*
IF( M.EQ.0 .OR. N.EQ.0 ) THEN
IF( M.EQ.0 .OR. N.EQ.0 .OR. NRHS.EQ.0 ) THEN
RANK = 0
RETURN
END IF
Expand Down Expand Up @@ -530,14 +530,14 @@ SUBROUTINE CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
*
ELSE IF( N.GE.MNTHR .AND. LWORK.GE.4*M+M*M+
$ MAX( M, 2*M-4, NRHS, N-3*M ) ) THEN
$ MAX( M, 2*M-4, NRHS, N-3*M, M*NRHS ) ) THEN
*
* Path 2a - underdetermined, with many more columns than rows
* and sufficient workspace for an efficient algorithm.
*
LDWORK = M
IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M ),
$ M*LDA+M+M*NRHS ) )LDWORK = LDA
IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M,
$ M*NRHS ), M*LDA+M+M*NRHS ) )LDWORK = LDA
ITAU = 1
NWORK = M + 1
*
Expand Down
2 changes: 1 addition & 1 deletion SRC/dgelsd.f
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
*
* Quick return if possible.
*
IF( M.EQ.0 .OR. N.EQ.0 ) THEN
IF( M.EQ.0 .OR. N.EQ.0 .OR. NRHS.EQ.0 ) THEN
RANK = 0
RETURN
END IF
Expand Down
2 changes: 1 addition & 1 deletion SRC/sgelsd.f
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ SUBROUTINE SGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND,
*
* Quick return if possible.
*
IF( M.EQ.0 .OR. N.EQ.0 ) THEN
IF( M.EQ.0 .OR. N.EQ.0 .OR. NRHS.EQ.0 ) THEN
RANK = 0
RETURN
END IF
Expand Down
8 changes: 4 additions & 4 deletions SRC/zgelsd.f
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
*
* Quick return if possible.
*
IF( M.EQ.0 .OR. N.EQ.0 ) THEN
IF( M.EQ.0 .OR. N.EQ.0 .OR. NRHS.EQ.0 ) THEN
RANK = 0
RETURN
END IF
Expand Down Expand Up @@ -529,14 +529,14 @@ SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
*
ELSE IF( N.GE.MNTHR .AND. LWORK.GE.4*M+M*M+
$ MAX( M, 2*M-4, NRHS, N-3*M ) ) THEN
$ MAX( M, 2*M-4, NRHS, N-3*M, M*NRHS ) ) THEN
*
* Path 2a - underdetermined, with many more columns than rows
* and sufficient workspace for an efficient algorithm.
*
LDWORK = M
IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M ),
$ M*LDA+M+M*NRHS ) )LDWORK = LDA
IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M,
$ M*NRHS ), M*LDA+M+M*NRHS ) )LDWORK = LDA
ITAU = 1
NWORK = M + 1
*
Expand Down