Skip to content

Commit

Permalink
Apply ROUNDUP_LWORK func in SRC/VARIANTS/qr/LL
Browse files Browse the repository at this point in the history
  • Loading branch information
kleine_li authored and kleine_li committed Oct 31, 2023
1 parent bff28b9 commit 689795f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
9 changes: 5 additions & 4 deletions SRC/VARIANTS/qr/LL/cgeqrf.f
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ SUBROUTINE CGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* ..
* .. External Functions ..
INTEGER ILAENV
EXTERNAL ILAENV
REAL SROUNDUP_LWORK
EXTERNAL ILAENV, SROUNDUP_LWORK
* ..
* .. Executable Statements ..

Expand Down Expand Up @@ -225,13 +226,13 @@ SUBROUTINE CGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* Optimal workspace for dlarfb = MAX(1,N)*NT
*
LWKOPT = (LBWORK+LLWORK)*NB
WORK( 1 ) = (LWKOPT+NT*NT)
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT+NT*NT)

ELSE

LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)

END IF

Expand Down Expand Up @@ -413,7 +414,7 @@ SUBROUTINE CGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )

END IF

WORK( 1 ) = IWS
WORK( 1 ) = SROUNDUP_LWORK(IWS)
RETURN
*
* End of CGEQRF
Expand Down
9 changes: 5 additions & 4 deletions SRC/VARIANTS/qr/LL/dgeqrf.f
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ SUBROUTINE DGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* ..
* .. External Functions ..
INTEGER ILAENV
EXTERNAL ILAENV
DOUBLE PRECISION DROUNDUP_LWORK
EXTERNAL ILAENV, DROUNDUP_LWORK
* ..
* .. Executable Statements ..

Expand Down Expand Up @@ -225,13 +226,13 @@ SUBROUTINE DGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* Optimal workspace for dlarfb = MAX(1,N)*NT
*
LWKOPT = (LBWORK+LLWORK)*NB
WORK( 1 ) = (LWKOPT+NT*NT)
WORK( 1 ) = DROUNDUP_LWORK(LWKOPT+NT*NT)

ELSE

LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT
WORK( 1 ) = DROUNDUP_LWORK(LWKOPT)

END IF

Expand Down Expand Up @@ -413,7 +414,7 @@ SUBROUTINE DGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )

END IF

WORK( 1 ) = IWS
WORK( 1 ) = DROUNDUP_LWORK(IWS)
RETURN
*
* End of DGEQRF
Expand Down
9 changes: 5 additions & 4 deletions SRC/VARIANTS/qr/LL/sgeqrf.f
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ SUBROUTINE SGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* ..
* .. External Functions ..
INTEGER ILAENV
EXTERNAL ILAENV
DOUBLE PRECISION DROUNDUP_LWORK
EXTERNAL ILAENV, DROUNDUP_LWORK
* ..
* .. Executable Statements ..

Expand Down Expand Up @@ -225,13 +226,13 @@ SUBROUTINE SGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* Optimal workspace for dlarfb = MAX(1,N)*NT
*
LWKOPT = (LBWORK+LLWORK)*NB
WORK( 1 ) = (LWKOPT+NT*NT)
WORK( 1 ) = DROUNDUP_LWORK(LWKOPT+NT*NT)

ELSE

LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT
WORK( 1 ) = DROUNDUP_LWORK(LWKOPT)

END IF

Expand Down Expand Up @@ -413,7 +414,7 @@ SUBROUTINE SGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )

END IF

WORK( 1 ) = IWS
WORK( 1 ) = DROUNDUP_LWORK(IWS)
RETURN
*
* End of SGEQRF
Expand Down
9 changes: 5 additions & 4 deletions SRC/VARIANTS/qr/LL/zgeqrf.f
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ SUBROUTINE ZGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* ..
* .. External Functions ..
INTEGER ILAENV
EXTERNAL ILAENV
REAL SROUNDUP_LWORK
EXTERNAL ILAENV, SROUNDUP_LWORK
* ..
* .. Executable Statements ..

Expand Down Expand Up @@ -225,13 +226,13 @@ SUBROUTINE ZGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
* Optimal workspace for dlarfb = MAX(1,N)*NT
*
LWKOPT = (LBWORK+LLWORK)*NB
WORK( 1 ) = (LWKOPT+NT*NT)
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT+NT*NT)

ELSE

LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)

END IF

Expand Down Expand Up @@ -413,7 +414,7 @@ SUBROUTINE ZGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )

END IF

WORK( 1 ) = IWS
WORK( 1 ) = SROUNDUP_LWORK(IWS)
RETURN
*
* End of ZGEQRF
Expand Down

0 comments on commit 689795f

Please sign in to comment.