206 SUBROUTINE zlarhs( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
207 $ A, LDA, X, LDX, B, LDB, ISEED, INFO )
214 CHARACTER TRANS, UPLO, XTYPE
216 INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
220 COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
227 parameter( one = ( 1.0d+0, 0.0d+0 ),
228 $ zero = ( 0.0d+0, 0.0d+0 ) )
231 LOGICAL BAND, GEN, NOTRAN, QRS, SYM, TRAN, TRI
237 LOGICAL LSAME, LSAMEN
238 EXTERNAL lsame, lsamen
255 tran = lsame( trans,
'T' ) .OR. lsame( trans,
'C' )
257 gen = lsame( path( 2: 2 ),
'G' )
258 qrs = lsame( path( 2: 2 ),
'Q' ) .OR. lsame( path( 3: 3 ),
'Q' )
259 sym = lsame( path( 2: 2 ),
'P' ) .OR.
260 $ lsame( path( 2: 2 ),
'S' ) .OR. lsame( path( 2: 2 ),
'H' )
261 tri = lsame( path( 2: 2 ),
'T' )
262 band = lsame( path( 3: 3 ),
'B' )
263 IF( .NOT.lsame( c1,
'Zomplex precision' ) )
THEN
265 ELSE IF( .NOT.( lsame( xtype,
'N' ) .OR. lsame( xtype,
'C' ) ) )
268 ELSE IF( ( sym .OR. tri ) .AND. .NOT.
269 $ ( lsame( uplo,
'U' ) .OR. lsame( uplo,
'L' ) ) )
THEN
271 ELSE IF( ( gen .OR. qrs ) .AND. .NOT.
272 $ ( tran .OR. lsame( trans,
'N' ) ) )
THEN
274 ELSE IF( m.LT.0 )
THEN
276 ELSE IF( n.LT.0 )
THEN
278 ELSE IF( band .AND. kl.LT.0 )
THEN
280 ELSE IF( band .AND. ku.LT.0 )
THEN
282 ELSE IF( nrhs.LT.0 )
THEN
284 ELSE IF( ( .NOT.band .AND. lda.LT.max( 1, m ) ) .OR.
285 $ ( band .AND. ( sym .OR. tri ) .AND. lda.LT.kl+1 ) .OR.
286 $ ( band .AND. gen .AND. lda.LT.kl+ku+1 ) )
THEN
288 ELSE IF( ( notran .AND. ldx.LT.max( 1, n ) ) .OR.
289 $ ( tran .AND. ldx.LT.max( 1, m ) ) )
THEN
291 ELSE IF( ( notran .AND. ldb.LT.max( 1, m ) ) .OR.
292 $ ( tran .AND. ldb.LT.max( 1, n ) ) )
THEN
296 CALL xerbla(
'ZLARHS', -info )
309 IF( .NOT.lsame( xtype,
'C' ) )
THEN
311 CALL zlarnv( 2, iseed, n, x( 1, j ) )
318 IF( lsamen( 2, c2,
'GE' ) .OR. lsamen( 2, c2,
'QR' ) .OR.
319 $ lsamen( 2, c2,
'LQ' ) .OR. lsamen( 2, c2,
'QL' ) .OR.
320 $ lsamen( 2, c2,
'RQ' ) )
THEN
324 CALL zgemm( trans,
'N', mb, nrhs, nx, one, a, lda, x, ldx,
327 ELSE IF( lsamen( 2, c2,
'PO' ) .OR. lsamen( 2, c2,
'HE' ) )
THEN
331 CALL zhemm(
'Left', uplo, n, nrhs, one, a, lda, x, ldx, zero,
334 ELSE IF( lsamen( 2, c2,
'SY' ) )
THEN
338 CALL zsymm(
'Left', uplo, n, nrhs, one, a, lda, x, ldx, zero,
341 ELSE IF( lsamen( 2, c2,
'GB' ) )
THEN
346 CALL zgbmv( trans, m, n, kl, ku, one, a, lda, x( 1, j ), 1,
347 $ zero, b( 1, j ), 1 )
350 ELSE IF( lsamen( 2, c2,
'PB' ) .OR. lsamen( 2, c2,
'HB' ) )
THEN
355 CALL zhbmv( uplo, n, kl, one, a, lda, x( 1, j ), 1, zero,
359 ELSE IF( lsamen( 2, c2,
'SB' ) )
THEN
364 CALL zsbmv( uplo, n, kl, one, a, lda, x( 1, j ), 1, zero,
368 ELSE IF( lsamen( 2, c2,
'PP' ) .OR. lsamen( 2, c2,
'HP' ) )
THEN
373 CALL zhpmv( uplo, n, one, a, x( 1, j ), 1, zero, b( 1, j ),
377 ELSE IF( lsamen( 2, c2,
'SP' ) )
THEN
382 CALL zspmv( uplo, n, one, a, x( 1, j ), 1, zero, b( 1, j ),
386 ELSE IF( lsamen( 2, c2,
'TR' ) )
THEN
392 CALL zlacpy(
'Full', n, nrhs, x, ldx, b, ldb )
398 CALL ztrmm(
'Left', uplo, trans, diag, n, nrhs, one, a, lda, b,
401 ELSE IF( lsamen( 2, c2,
'TP' ) )
THEN
405 CALL zlacpy(
'Full', n, nrhs, x, ldx, b, ldb )
412 CALL ztpmv( uplo, trans, diag, n, a, b( 1, j ), 1 )
415 ELSE IF( lsamen( 2, c2,
'TB' ) )
THEN
419 CALL zlacpy(
'Full', n, nrhs, x, ldx, b, ldb )
426 CALL ztbmv( uplo, trans, diag, n, kl, a, lda, b( 1, j ), 1 )
434 CALL xerbla(
'ZLARHS', -info )
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
subroutine zsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
ZSBMV
subroutine xerbla(srname, info)
subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
ZGBMV
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
ZHBMV
subroutine zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
ZHEMM
subroutine zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
ZSYMM
subroutine zspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
ZSPMV computes a matrix-vector product for complex vectors using a complex symmetric packed matrix
subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
ZHPMV
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlarnv(idist, iseed, n, x)
ZLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx)
ZTBMV
subroutine ztpmv(uplo, trans, diag, n, ap, x, incx)
ZTPMV
subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRMM