Skip to content

Commit 2ce67e2

Browse files
authored
Apply ROUNDUP_LWORK (Reference-LAPACK PR 904)
1 parent f566474 commit 2ce67e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+414
-357
lines changed

lapack-netlib/SRC/sorghr.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
*> \author Univ. of Colorado Denver
120120
*> \author NAG Ltd.
121121
*
122-
*> \ingroup realOTHERcomputational
122+
*> \ingroup unghr
123123
*
124124
* =====================================================================
125125
SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
@@ -150,7 +150,8 @@ SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
150150
* ..
151151
* .. External Functions ..
152152
INTEGER ILAENV
153-
EXTERNAL ILAENV
153+
REAL SROUNDUP_LWORK
154+
EXTERNAL ILAENV, SROUNDUP_LWORK
154155
* ..
155156
* .. Intrinsic Functions ..
156157
INTRINSIC MAX, MIN
@@ -177,7 +178,7 @@ SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
177178
IF( INFO.EQ.0 ) THEN
178179
NB = ILAENV( 1, 'SORGQR', ' ', NH, NH, NH, -1 )
179180
LWKOPT = MAX( 1, NH )*NB
180-
WORK( 1 ) = LWKOPT
181+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
181182
END IF
182183
*
183184
IF( INFO.NE.0 ) THEN
@@ -229,7 +230,7 @@ SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
229230
CALL SORGQR( NH, NH, NH, A( ILO+1, ILO+1 ), LDA, TAU( ILO ),
230231
$ WORK, LWORK, IINFO )
231232
END IF
232-
WORK( 1 ) = LWKOPT
233+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
233234
RETURN
234235
*
235236
* End of SORGHR

lapack-netlib/SRC/sorglq.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
*> \author Univ. of Colorado Denver
121121
*> \author NAG Ltd.
122122
*
123-
*> \ingroup realOTHERcomputational
123+
*> \ingroup unglq
124124
*
125125
* =====================================================================
126126
SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
@@ -155,7 +155,8 @@ SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
155155
* ..
156156
* .. External Functions ..
157157
INTEGER ILAENV
158-
EXTERNAL ILAENV
158+
REAL SROUNDUP_LWORK
159+
EXTERNAL ILAENV, SROUNDUP_LWORK
159160
* ..
160161
* .. Executable Statements ..
161162
*
@@ -164,7 +165,7 @@ SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
164165
INFO = 0
165166
NB = ILAENV( 1, 'SORGLQ', ' ', M, N, K, -1 )
166167
LWKOPT = MAX( 1, M )*NB
167-
WORK( 1 ) = LWKOPT
168+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
168169
LQUERY = ( LWORK.EQ.-1 )
169170
IF( M.LT.0 ) THEN
170171
INFO = -1
@@ -278,7 +279,7 @@ SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
278279
50 CONTINUE
279280
END IF
280281
*
281-
WORK( 1 ) = IWS
282+
WORK( 1 ) = SROUNDUP_LWORK(IWS)
282283
RETURN
283284
*
284285
* End of SORGLQ

lapack-netlib/SRC/sorgql.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
*> \author Univ. of Colorado Denver
122122
*> \author NAG Ltd.
123123
*
124-
*> \ingroup realOTHERcomputational
124+
*> \ingroup ungql
125125
*
126126
* =====================================================================
127127
SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
@@ -156,7 +156,8 @@ SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
156156
* ..
157157
* .. External Functions ..
158158
INTEGER ILAENV
159-
EXTERNAL ILAENV
159+
REAL SROUNDUP_LWORK
160+
EXTERNAL ILAENV, SROUNDUP_LWORK
160161
* ..
161162
* .. Executable Statements ..
162163
*
@@ -181,7 +182,7 @@ SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
181182
NB = ILAENV( 1, 'SORGQL', ' ', M, N, K, -1 )
182183
LWKOPT = N*NB
183184
END IF
184-
WORK( 1 ) = LWKOPT
185+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
185186
*
186187
IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
187188
INFO = -8
@@ -285,7 +286,7 @@ SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
285286
50 CONTINUE
286287
END IF
287288
*
288-
WORK( 1 ) = IWS
289+
WORK( 1 ) = SROUNDUP_LWORK(IWS)
289290
RETURN
290291
*
291292
* End of SORGQL

lapack-netlib/SRC/sorgqr.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
*> \author Univ. of Colorado Denver
122122
*> \author NAG Ltd.
123123
*
124-
*> \ingroup realOTHERcomputational
124+
*> \ingroup ungqr
125125
*
126126
* =====================================================================
127127
SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
@@ -156,7 +156,8 @@ SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
156156
* ..
157157
* .. External Functions ..
158158
INTEGER ILAENV
159-
EXTERNAL ILAENV
159+
REAL SROUNDUP_LWORK
160+
EXTERNAL ILAENV, SROUNDUP_LWORK
160161
* ..
161162
* .. Executable Statements ..
162163
*
@@ -165,7 +166,7 @@ SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
165166
INFO = 0
166167
NB = ILAENV( 1, 'SORGQR', ' ', M, N, K, -1 )
167168
LWKOPT = MAX( 1, N )*NB
168-
WORK( 1 ) = LWKOPT
169+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
169170
LQUERY = ( LWORK.EQ.-1 )
170171
IF( M.LT.0 ) THEN
171172
INFO = -1
@@ -279,7 +280,7 @@ SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
279280
50 CONTINUE
280281
END IF
281282
*
282-
WORK( 1 ) = IWS
283+
WORK( 1 ) = SROUNDUP_LWORK(IWS)
283284
RETURN
284285
*
285286
* End of SORGQR

lapack-netlib/SRC/sorgrq.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
*> \author Univ. of Colorado Denver
122122
*> \author NAG Ltd.
123123
*
124-
*> \ingroup realOTHERcomputational
124+
*> \ingroup ungrq
125125
*
126126
* =====================================================================
127127
SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
@@ -156,7 +156,8 @@ SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
156156
* ..
157157
* .. External Functions ..
158158
INTEGER ILAENV
159-
EXTERNAL ILAENV
159+
REAL SROUNDUP_LWORK
160+
EXTERNAL ILAENV, SROUNDUP_LWORK
160161
* ..
161162
* .. Executable Statements ..
162163
*
@@ -181,7 +182,7 @@ SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
181182
NB = ILAENV( 1, 'SORGRQ', ' ', M, N, K, -1 )
182183
LWKOPT = M*NB
183184
END IF
184-
WORK( 1 ) = LWKOPT
185+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
185186
*
186187
IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN
187188
INFO = -8
@@ -285,7 +286,7 @@ SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
285286
50 CONTINUE
286287
END IF
287288
*
288-
WORK( 1 ) = IWS
289+
WORK( 1 ) = SROUNDUP_LWORK(IWS)
289290
RETURN
290291
*
291292
* End of SORGRQ

lapack-netlib/SRC/sorgtr.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
*> \author Univ. of Colorado Denver
117117
*> \author NAG Ltd.
118118
*
119-
*> \ingroup realOTHERcomputational
119+
*> \ingroup ungtr
120120
*
121121
* =====================================================================
122122
SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
@@ -146,7 +146,8 @@ SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
146146
* .. External Functions ..
147147
LOGICAL LSAME
148148
INTEGER ILAENV
149-
EXTERNAL ILAENV, LSAME
149+
REAL SROUNDUP_LWORK
150+
EXTERNAL ILAENV, LSAME, SROUNDUP_LWORK
150151
* ..
151152
* .. External Subroutines ..
152153
EXTERNAL SORGQL, SORGQR, XERBLA
@@ -178,7 +179,7 @@ SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
178179
NB = ILAENV( 1, 'SORGQR', ' ', N-1, N-1, N-1, -1 )
179180
END IF
180181
LWKOPT = MAX( 1, N-1 )*NB
181-
WORK( 1 ) = LWKOPT
182+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
182183
END IF
183184
*
184185
IF( INFO.NE.0 ) THEN
@@ -244,7 +245,7 @@ SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
244245
$ LWORK, IINFO )
245246
END IF
246247
END IF
247-
WORK( 1 ) = LWKOPT
248+
WORK( 1 ) = SROUNDUP_LWORK(LWKOPT)
248249
RETURN
249250
*
250251
* End of SORGTR

lapack-netlib/SRC/sorgtsqr.f

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
*> \author Univ. of Colorado Denver
158158
*> \author NAG Ltd.
159159
*
160-
*> \ingroup singleOTHERcomputational
160+
*> \ingroup ungtsqr
161161
*
162162
*> \par Contributors:
163163
* ==================
@@ -196,11 +196,15 @@ SUBROUTINE SORGTSQR( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
196196
LOGICAL LQUERY
197197
INTEGER IINFO, LDC, LWORKOPT, LC, LW, NBLOCAL, J
198198
* ..
199+
* .. External Functions ..
200+
REAL SROUNDUP_LWORK
201+
EXTERNAL SROUNDUP_LWORK
202+
* ..
199203
* .. External Subroutines ..
200204
EXTERNAL SCOPY, SLAMTSQR, SLASET, XERBLA
201205
* ..
202206
* .. Intrinsic Functions ..
203-
INTRINSIC REAL, MAX, MIN
207+
INTRINSIC MAX, MIN
204208
* ..
205209
* .. Executable Statements ..
206210
*
@@ -257,14 +261,14 @@ SUBROUTINE SORGTSQR( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
257261
CALL XERBLA( 'SORGTSQR', -INFO )
258262
RETURN
259263
ELSE IF ( LQUERY ) THEN
260-
WORK( 1 ) = REAL( LWORKOPT )
264+
WORK( 1 ) = SROUNDUP_LWORK( LWORKOPT )
261265
RETURN
262266
END IF
263267
*
264268
* Quick return if possible
265269
*
266270
IF( MIN( M, N ).EQ.0 ) THEN
267-
WORK( 1 ) = REAL( LWORKOPT )
271+
WORK( 1 ) = SROUNDUP_LWORK( LWORKOPT )
268272
RETURN
269273
END IF
270274
*
@@ -297,7 +301,7 @@ SUBROUTINE SORGTSQR( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
297301
CALL SCOPY( M, WORK( (J-1)*LDC + 1 ), 1, A( 1, J ), 1 )
298302
END DO
299303
*
300-
WORK( 1 ) = REAL( LWORKOPT )
304+
WORK( 1 ) = SROUNDUP_LWORK( LWORKOPT )
301305
RETURN
302306
*
303307
* End of SORGTSQR

lapack-netlib/SRC/sorgtsqr_row.f

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
*> \author Univ. of Colorado Denver
170170
*> \author NAG Ltd.
171171
*
172-
*> \ingroup sigleOTHERcomputational
172+
*> \ingroup ungtsqr_row
173173
*
174174
*> \par Contributors:
175175
* ==================
@@ -213,11 +213,15 @@ SUBROUTINE SORGTSQR_ROW( M, N, MB, NB, A, LDA, T, LDT, WORK,
213213
* .. Local Arrays ..
214214
REAL DUMMY( 1, 1 )
215215
* ..
216+
* .. External Functions ..
217+
REAL SROUNDUP_LWORK
218+
EXTERNAL SROUNDUP_LWORK
219+
* ..
216220
* .. External Subroutines ..
217221
EXTERNAL SLARFB_GETT, SLASET, XERBLA
218222
* ..
219223
* .. Intrinsic Functions ..
220-
INTRINSIC REAL, MAX, MIN
224+
INTRINSIC MAX, MIN
221225
* ..
222226
* .. Executable Statements ..
223227
*
@@ -255,14 +259,14 @@ SUBROUTINE SORGTSQR_ROW( M, N, MB, NB, A, LDA, T, LDT, WORK,
255259
CALL XERBLA( 'SORGTSQR_ROW', -INFO )
256260
RETURN
257261
ELSE IF ( LQUERY ) THEN
258-
WORK( 1 ) = REAL( LWORKOPT )
262+
WORK( 1 ) = SROUNDUP_LWORK( LWORKOPT )
259263
RETURN
260264
END IF
261265
*
262266
* Quick return if possible
263267
*
264268
IF( MIN( M, N ).EQ.0 ) THEN
265-
WORK( 1 ) = REAL( LWORKOPT )
269+
WORK( 1 ) = SROUNDUP_LWORK( LWORKOPT )
266270
RETURN
267271
END IF
268272
*
@@ -371,7 +375,7 @@ SUBROUTINE SORGTSQR_ROW( M, N, MB, NB, A, LDA, T, LDT, WORK,
371375
*
372376
END DO
373377
*
374-
WORK( 1 ) = REAL( LWORKOPT )
378+
WORK( 1 ) = SROUNDUP_LWORK( LWORKOPT )
375379
RETURN
376380
*
377381
* End of SORGTSQR_ROW

lapack-netlib/SRC/sorm22.f

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
*> \author Univ. of Colorado Denver
156156
*> \author NAG Ltd.
157157
*
158-
*> \ingroup complexOTHERcomputational
158+
*> \ingroup unm22
159159
*
160160
* =====================================================================
161161
SUBROUTINE SORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
@@ -187,13 +187,14 @@ SUBROUTINE SORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
187187
* ..
188188
* .. External Functions ..
189189
LOGICAL LSAME
190-
EXTERNAL LSAME
190+
REAL SROUNDUP_LWORK
191+
EXTERNAL LSAME, SROUNDUP_LWORK
191192
* ..
192193
* .. External Subroutines ..
193194
EXTERNAL SGEMM, SLACPY, STRMM, XERBLA
194195
* ..
195196
* .. Intrinsic Functions ..
196-
INTRINSIC REAL, MAX, MIN
197+
INTRINSIC MAX, MIN
197198
* ..
198199
* .. Executable Statements ..
199200
*
@@ -237,7 +238,7 @@ SUBROUTINE SORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
237238
*
238239
IF( INFO.EQ.0 ) THEN
239240
LWKOPT = M*N
240-
WORK( 1 ) = REAL( LWKOPT )
241+
WORK( 1 ) = SROUNDUP_LWORK( LWKOPT )
241242
END IF
242243
*
243244
IF( INFO.NE.0 ) THEN
@@ -430,7 +431,7 @@ SUBROUTINE SORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
430431
END IF
431432
END IF
432433
*
433-
WORK( 1 ) = REAL( LWKOPT )
434+
WORK( 1 ) = SROUNDUP_LWORK( LWKOPT )
434435
RETURN
435436
*
436437
* End of SORM22

0 commit comments

Comments
 (0)