154 $ NI, NBI, IBI, NXI )
165 CHARACTER*( * ) name, opts
166 INTEGER ispec, ni, nbi, ibi, nxi
171 INTEGER i, ic, iz, kd, ib, lhous, lwork, nthreads,
172 $ factoptnb, qroptnb, lqoptnb
174 CHARACTER prec*1, algo*3, stag*5, subnam*12, vect*1
177 INTRINSIC char, ichar, max
188 IF( (ispec.LT.17).OR.(ispec.GT.21) )
THEN
198 nthreads = omp_get_num_threads()
203 IF( ispec .NE. 19 )
THEN
209 ic = ichar( subnam( 1: 1 ) )
211 IF( iz.EQ.90 .OR. iz.EQ.122 )
THEN
215 IF( ic.GE.97 .AND. ic.LE.122 )
THEN
216 subnam( 1: 1 ) = char( ic-32 )
218 ic = ichar( subnam( i: i ) )
219 IF( ic.GE.97 .AND. ic.LE.122 )
220 $ subnam( i: i ) = char( ic-32 )
224 ELSE IF( iz.EQ.233 .OR. iz.EQ.169 )
THEN
228 IF( ( ic.GE.129 .AND. ic.LE.137 ) .OR.
229 $ ( ic.GE.145 .AND. ic.LE.153 ) .OR.
230 $ ( ic.GE.162 .AND. ic.LE.169 ) )
THEN
231 subnam( 1: 1 ) = char( ic+64 )
233 ic = ichar( subnam( i: i ) )
234 IF( ( ic.GE.129 .AND. ic.LE.137 ) .OR.
235 $ ( ic.GE.145 .AND. ic.LE.153 ) .OR.
236 $ ( ic.GE.162 .AND. ic.LE.169 ) )subnam( i:
237 $ i ) = char( ic+64 )
241 ELSE IF( iz.EQ.218 .OR. iz.EQ.250 )
THEN
245 IF( ic.GE.225 .AND. ic.LE.250 )
THEN
246 subnam( 1: 1 ) = char( ic-32 )
248 ic = ichar( subnam( i: i ) )
249 IF( ic.GE.225 .AND. ic.LE.250 )
250 $ subnam( i: i ) = char( ic-32 )
255 prec = subnam( 1: 1 )
256 algo = subnam( 4: 6 )
257 stag = subnam( 8:12 )
258 rprec = prec.EQ.
'S' .OR. prec.EQ.
'D'
259 cprec = prec.EQ.
'C' .OR. prec.EQ.
'Z'
263 IF( .NOT.( rprec .OR. cprec ) )
THEN
272 IF (( ispec .EQ. 17 ) .OR. ( ispec .EQ. 18 ))
THEN
278 IF( nthreads.GT.4 )
THEN
286 ELSE IF( nthreads.GT.1 )
THEN
306 ELSE IF ( ispec .EQ. 19 )
THEN
314 IF(
lsame( vect,
'N' ) )
THEN
315 lhous = max( 1, 4*ni )
318 lhous = max( 1, 4*ni ) + ibi
320 IF( lhous.GE.0 )
THEN
326 ELSE IF ( ispec .EQ. 20 )
THEN
343 subnam(2:6) =
'GEQRF'
344 qroptnb =
ilaenv( 1, subnam,
' ', ni, nbi, -1, -1 )
345 subnam(2:6) =
'GELQF'
346 lqoptnb =
ilaenv( 1, subnam,
' ', nbi, ni, -1, -1 )
348 factoptnb = max(qroptnb, lqoptnb)
349 IF( algo.EQ.
'TRD' )
THEN
350 IF( stag.EQ.
'2STAG' )
THEN
351 lwork = ni*nbi + ni*max(nbi+1,factoptnb)
352 $ + max(2*nbi*nbi, nbi*nthreads)
354 ELSE IF( (stag.EQ.
'HE2HB').OR.(stag.EQ.
'SY2SB') )
THEN
355 lwork = ni*nbi + ni*max(nbi,factoptnb) + 2*nbi*nbi
356 ELSE IF( (stag.EQ.
'HB2ST').OR.(stag.EQ.
'SB2ST') )
THEN
357 lwork = (2*nbi+1)*ni + nbi*nthreads
359 ELSE IF( algo.EQ.
'BRD' )
THEN
360 IF( stag.EQ.
'2STAG' )
THEN
361 lwork = 2*ni*nbi + ni*max(nbi+1,factoptnb)
362 $ + max(2*nbi*nbi, nbi*nthreads)
364 ELSE IF( stag.EQ.
'GE2GB' )
THEN
365 lwork = ni*nbi + ni*max(nbi,factoptnb) + 2*nbi*nbi
366 ELSE IF( stag.EQ.
'GB2BD' )
THEN
367 lwork = (3*nbi+1)*ni + nbi*nthreads
370 lwork = max( 1, lwork )
372 IF( lwork.GT.0 )
THEN
378 ELSE IF ( ispec .EQ. 21 )
THEN
integer function ilaenv(ispec, name, opts, n1, n2, n3, n4)
ILAENV
integer function iparam2stage(ispec, name, opts, ni, nbi, ibi, nxi)
IPARAM2STAGE
logical function lsame(ca, cb)
LSAME