diff options
Diffstat (limited to 'SRC/dorgbr.f')
-rw-r--r-- | SRC/dorgbr.f | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/SRC/dorgbr.f b/SRC/dorgbr.f index 8cb93442..c6390b95 100644 --- a/SRC/dorgbr.f +++ b/SRC/dorgbr.f @@ -217,12 +217,21 @@ * IF( INFO.EQ.0 ) THEN IF( WANTQ ) THEN - NB = ILAENV( 1, 'DORGQR', ' ', M, N, K, -1 ) + IF( M.GE.K ) THEN + CALL DORGQR( M, N, K, A, LDA, TAU, WORK, -1, IINFO ) + ELSE + CALL DORGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK, + $ -1, IINFO ) + END IF ELSE - NB = ILAENV( 1, 'DORGLQ', ' ', M, N, K, -1 ) + IF( K.LT.N ) THEN + CALL DORGLQ( M, N, K, A, LDA, TAU, WORK, -1, IINFO ) + ELSE + CALL DORGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, + $ -1, IINFO ) + END IF END IF - LWKOPT = MAX( 1, MN )*NB - WORK( 1 ) = LWKOPT + LWKOPT = WORK( 1 ) END IF * IF( INFO.NE.0 ) THEN |