Replace SCEIL with CEILING intrinsic (Reference-LAPACK PR 847)

This commit is contained in:
Martin Kroeker 2023-06-18 10:11:30 +02:00 committed by GitHub
parent f330f862f9
commit f524594d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 26 deletions

View File

@ -23,7 +23,7 @@ C> \brief \b CGEQRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
C>\details \b Purpose: C>\details \b Purpose:
C>\verbatim C>\verbatim
C> C>
C> CGEQRF computes a QR factorization of a real M-by-N matrix A: C> CGEQRF computes a QR factorization of a complex M-by-N matrix A:
C> A = Q * R. C> A = Q * R.
C> C>
C> This is the left-looking Level 3 BLAS version of the algorithm. C> This is the left-looking Level 3 BLAS version of the algorithm.
@ -172,12 +172,11 @@ C>
EXTERNAL CGEQR2, CLARFB, CLARFT, XERBLA EXTERNAL CGEQR2, CLARFB, CLARFT, XERBLA
* .. * ..
* .. Intrinsic Functions .. * .. Intrinsic Functions ..
INTRINSIC MAX, MIN INTRINSIC CEILING, MAX, MIN, REAL
* .. * ..
* .. External Functions .. * .. External Functions ..
INTEGER ILAENV INTEGER ILAENV
REAL SCEIL EXTERNAL ILAENV
EXTERNAL ILAENV, SCEIL
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
@ -205,13 +204,13 @@ C>
* *
* So here 4 x 4 is the last T stored in the workspace * So here 4 x 4 is the last T stored in the workspace
* *
NT = K-SCEIL(REAL(K-NX)/REAL(NB))*NB NT = K-CEILING(REAL(K-NX)/REAL(NB))*NB
* *
* optimal workspace = space for dlarfb + space for normal T's + space for the last T * optimal workspace = space for dlarfb + space for normal T's + space for the last T
* *
LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB)) LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB))
LLWORK = SCEIL(REAL(LLWORK)/REAL(NB)) LLWORK = CEILING(REAL(LLWORK)/REAL(NB))
IF( K.EQ.0 ) THEN IF( K.EQ.0 ) THEN
@ -230,7 +229,7 @@ C>
ELSE ELSE
LBWORK = SCEIL(REAL(K)/REAL(NB))*NB LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT

View File

@ -172,12 +172,11 @@ C>
EXTERNAL DGEQR2, DLARFB, DLARFT, XERBLA EXTERNAL DGEQR2, DLARFB, DLARFT, XERBLA
* .. * ..
* .. Intrinsic Functions .. * .. Intrinsic Functions ..
INTRINSIC MAX, MIN INTRINSIC CEILING, MAX, MIN, REAL
* .. * ..
* .. External Functions .. * .. External Functions ..
INTEGER ILAENV INTEGER ILAENV
REAL SCEIL EXTERNAL ILAENV
EXTERNAL ILAENV, SCEIL
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
@ -205,13 +204,13 @@ C>
* *
* So here 4 x 4 is the last T stored in the workspace * So here 4 x 4 is the last T stored in the workspace
* *
NT = K-SCEIL(REAL(K-NX)/REAL(NB))*NB NT = K-CEILING(REAL(K-NX)/REAL(NB))*NB
* *
* optimal workspace = space for dlarfb + space for normal T's + space for the last T * optimal workspace = space for dlarfb + space for normal T's + space for the last T
* *
LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB)) LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB))
LLWORK = SCEIL(REAL(LLWORK)/REAL(NB)) LLWORK = CEILING(REAL(LLWORK)/REAL(NB))
IF( K.EQ.0 ) THEN IF( K.EQ.0 ) THEN
@ -230,7 +229,7 @@ C>
ELSE ELSE
LBWORK = SCEIL(REAL(K)/REAL(NB))*NB LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT

View File

@ -172,12 +172,11 @@ C>
EXTERNAL SGEQR2, SLARFB, SLARFT, XERBLA EXTERNAL SGEQR2, SLARFB, SLARFT, XERBLA
* .. * ..
* .. Intrinsic Functions .. * .. Intrinsic Functions ..
INTRINSIC MAX, MIN INTRINSIC CEILING, MAX, MIN, REAL
* .. * ..
* .. External Functions .. * .. External Functions ..
INTEGER ILAENV INTEGER ILAENV
REAL SCEIL EXTERNAL ILAENV
EXTERNAL ILAENV, SCEIL
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
@ -205,13 +204,13 @@ C>
* *
* So here 4 x 4 is the last T stored in the workspace * So here 4 x 4 is the last T stored in the workspace
* *
NT = K-SCEIL(REAL(K-NX)/REAL(NB))*NB NT = K-CEILING(REAL(K-NX)/REAL(NB))*NB
* *
* optimal workspace = space for dlarfb + space for normal T's + space for the last T * optimal workspace = space for dlarfb + space for normal T's + space for the last T
* *
LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB)) LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB))
LLWORK = SCEIL(REAL(LLWORK)/REAL(NB)) LLWORK = CEILING(REAL(LLWORK)/REAL(NB))
IF( K.EQ.0 ) THEN IF( K.EQ.0 ) THEN
@ -230,7 +229,7 @@ C>
ELSE ELSE
LBWORK = SCEIL(REAL(K)/REAL(NB))*NB LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT

View File

@ -23,7 +23,7 @@ C> \brief \b ZGEQRF VARIANT: left-looking Level 3 BLAS of the algorithm.
C>\details \b Purpose: C>\details \b Purpose:
C>\verbatim C>\verbatim
C> C>
C> ZGEQRF computes a QR factorization of a real M-by-N matrix A: C> ZGEQRF computes a QR factorization of a complex M-by-N matrix A:
C> A = Q * R. C> A = Q * R.
C> C>
C> This is the left-looking Level 3 BLAS version of the algorithm. C> This is the left-looking Level 3 BLAS version of the algorithm.
@ -172,12 +172,11 @@ C>
EXTERNAL ZGEQR2, ZLARFB, ZLARFT, XERBLA EXTERNAL ZGEQR2, ZLARFB, ZLARFT, XERBLA
* .. * ..
* .. Intrinsic Functions .. * .. Intrinsic Functions ..
INTRINSIC MAX, MIN INTRINSIC CEILING, MAX, MIN, REAL
* .. * ..
* .. External Functions .. * .. External Functions ..
INTEGER ILAENV INTEGER ILAENV
REAL SCEIL EXTERNAL ILAENV
EXTERNAL ILAENV, SCEIL
* .. * ..
* .. Executable Statements .. * .. Executable Statements ..
@ -205,13 +204,13 @@ C>
* *
* So here 4 x 4 is the last T stored in the workspace * So here 4 x 4 is the last T stored in the workspace
* *
NT = K-SCEIL(REAL(K-NX)/REAL(NB))*NB NT = K-CEILING(REAL(K-NX)/REAL(NB))*NB
* *
* optimal workspace = space for dlarfb + space for normal T's + space for the last T * optimal workspace = space for dlarfb + space for normal T's + space for the last T
* *
LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB)) LLWORK = MAX (MAX((N-M)*K, (N-M)*NB), MAX(K*NB, NB*NB))
LLWORK = SCEIL(REAL(LLWORK)/REAL(NB)) LLWORK = CEILING(REAL(LLWORK)/REAL(NB))
IF( K.EQ.0 ) THEN IF( K.EQ.0 ) THEN
@ -230,7 +229,7 @@ C>
ELSE ELSE
LBWORK = SCEIL(REAL(K)/REAL(NB))*NB LBWORK = CEILING(REAL(K)/REAL(NB))*NB
LWKOPT = (LBWORK+LLWORK-NB)*NB LWKOPT = (LBWORK+LLWORK-NB)*NB
WORK( 1 ) = LWKOPT WORK( 1 ) = LWKOPT