summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIchitaro Yamazaki <iyamazak@bunsen.icl.utk.edu>2016-11-11 15:30:45 -0500
committerIchitaro Yamazaki <iyamazak@bunsen.icl.utk.edu>2016-11-11 15:30:45 -0500
commit31e9cb2d13ab9adc495d6a49a720295b3c284788 (patch)
tree81889249ff34df3e90f4c930b2c9183741d92cb9
parent857e3680330b24d07629a66120937437e45d4938 (diff)
downloadlapack-31e9cb2d13ab9adc495d6a49a720295b3c284788.tar.gz
lapack-31e9cb2d13ab9adc495d6a49a720295b3c284788.tar.bz2
lapack-31e9cb2d13ab9adc495d6a49a720295b3c284788.zip
Workspace query for ZHESV_AA.
-rw-r--r--SRC/chesv_aa.f15
-rw-r--r--SRC/dsysv_aa.f13
-rw-r--r--SRC/ssysv_aa.f14
-rw-r--r--SRC/zhesv_aa.f15
4 files changed, 40 insertions, 17 deletions
diff --git a/SRC/chesv_aa.f b/SRC/chesv_aa.f
index a3ec57ac..aae45e60 100644
--- a/SRC/chesv_aa.f
+++ b/SRC/chesv_aa.f
@@ -182,7 +182,7 @@
*
* .. Local Scalars ..
LOGICAL LQUERY
- INTEGER LWKOPT, NB
+ INTEGER LWKOPT, LWKOPT_HETRF, LWKOPT_HETRS
* ..
* .. External Functions ..
LOGICAL LSAME
@@ -211,14 +211,19 @@
INFO = -5
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -8
- ELSE IF( LWORK.LT.MAX(2*N, 3*N-2) .AND. .NOT.LQUERY ) THEN
- INFO = -10
END IF
*
IF( INFO.EQ.0 ) THEN
- NB = ILAENV( 1, 'CHETRF_AA', UPLO, N, -1, -1, -1 )
- LWKOPT = MAX( 3*N-2, (1+NB)*N )
+ CALL CHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, -1, INFO )
+ LWKOPT_HETRF = INT( WORK(1) )
+ CALL CHETRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+ $ -1, INFO )
+ LWKOPT_HETRS = INT( WORK(1) )
+ LWKOPT = MAX( LWKOPT_HETRF, LWKOPT_HETRS )
WORK( 1 ) = LWKOPT
+ IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
+ INFO = -10
+ END IF
END IF
*
IF( INFO.NE.0 ) THEN
diff --git a/SRC/dsysv_aa.f b/SRC/dsysv_aa.f
index f3d634db..9f9969fb 100644
--- a/SRC/dsysv_aa.f
+++ b/SRC/dsysv_aa.f
@@ -180,7 +180,7 @@
*
* .. Local Scalars ..
LOGICAL LQUERY
- INTEGER LWKOPT, NB
+ INTEGER LWKOPT, LWKOPT_SYTRF, LWKOPT_SYTRS
* ..
* .. External Functions ..
LOGICAL LSAME
@@ -214,9 +214,16 @@
END IF
*
IF( INFO.EQ.0 ) THEN
- NB = ILAENV( 1, 'DSYTRF_AA', UPLO, N, -1, -1, -1 )
- LWKOPT = MAX( 3*N-2, (1+NB)*N )
+ CALL DSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, -1, INFO )
+ LWKOPT_SYTRF = INT( WORK(1) )
+ CALL DSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+ $ -1, INFO )
+ LWKOPT_SYTRS = INT( WORK(1) )
+ LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS )
WORK( 1 ) = LWKOPT
+ IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
+ INFO = -10
+ END IF
END IF
*
IF( INFO.NE.0 ) THEN
diff --git a/SRC/ssysv_aa.f b/SRC/ssysv_aa.f
index a993f8c8..52f6eb5f 100644
--- a/SRC/ssysv_aa.f
+++ b/SRC/ssysv_aa.f
@@ -180,7 +180,7 @@
*
* .. Local Scalars ..
LOGICAL LQUERY
- INTEGER LWKOPT
+ INTEGER LWKOPT, LWKOPT_SYTRF, LWKOPT_SYTRS
* ..
* .. External Functions ..
LOGICAL LSAME
@@ -213,10 +213,16 @@
END IF
*
IF( INFO.EQ.0 ) THEN
- CALL SSYTRF( UPLO, N, A, LDA, IPIV, WORK, -1, INFO )
- LWKOPT = WORK(1)
- LWKOPT = MAX( 3*N-2, LWKOPT )
+ CALL SSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, -1, INFO )
+ LWKOPT_SYTRF = INT( WORK(1) )
+ CALL SSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+ $ -1, INFO )
+ LWKOPT_SYTRS = INT( WORK(1) )
+ LWKOPT = MAX( LWKOPT_SYTRF, LWKOPT_SYTRS )
WORK( 1 ) = LWKOPT
+ IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
+ INFO = -10
+ END IF
END IF
*
IF( INFO.NE.0 ) THEN
diff --git a/SRC/zhesv_aa.f b/SRC/zhesv_aa.f
index 3a9f1ec9..50314547 100644
--- a/SRC/zhesv_aa.f
+++ b/SRC/zhesv_aa.f
@@ -182,7 +182,7 @@
*
* .. Local Scalars ..
LOGICAL LQUERY
- INTEGER LWKOPT, NB
+ INTEGER LWKOPT, LWKOPT_HETRF, LWKOPT_HETRS
* ..
* .. External Functions ..
LOGICAL LSAME
@@ -211,14 +211,19 @@
INFO = -5
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
INFO = -8
- ELSE IF( LWORK.LT.MAX(2*N, 3*N-2) .AND. .NOT.LQUERY ) THEN
- INFO = -10
END IF
*
IF( INFO.EQ.0 ) THEN
- NB = ILAENV( 1, 'ZHETRF_AA', UPLO, N, -1, -1, -1 )
- LWKOPT = MAX( 3*N-2, (1+NB)*N )
+ CALL ZHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, -1, INFO )
+ LWKOPT_HETRF = INT( WORK(1) )
+ CALL ZHETRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+ $ -1, INFO )
+ LWKOPT_HETRS = INT( WORK(1) )
+ LWKOPT = MAX( LWKOPT_HETRF, LWKOPT_HETRS )
WORK( 1 ) = LWKOPT
+ IF( LWORK.LT.LWKOPT .AND. .NOT.LQUERY ) THEN
+ INFO = -10
+ END IF
END IF
*
IF( INFO.NE.0 ) THEN