203 SUBROUTINE slarhs( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
204 $ A, LDA, X, LDX, B, LDB, ISEED, INFO )
211 CHARACTER TRANS, UPLO, XTYPE
213 INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
217 REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
224 parameter( one = 1.0e+0, zero = 0.0e+0 )
227 LOGICAL BAND, GEN, NOTRAN, QRS, SYM, TRAN, TRI
233 LOGICAL LSAME, LSAMEN
234 EXTERNAL lsame, lsamen
250 tran = lsame( trans,
'T' ) .OR. lsame( trans,
'C' )
252 gen = lsame( path( 2: 2 ),
'G' )
253 qrs = lsame( path( 2: 2 ),
'Q' ) .OR. lsame( path( 3: 3 ),
'Q' )
254 sym = lsame( path( 2: 2 ),
'P' ) .OR. lsame( path( 2: 2 ),
'S' )
255 tri = lsame( path( 2: 2 ),
'T' )
256 band = lsame( path( 3: 3 ),
'B' )
257 IF( .NOT.lsame( c1,
'Single precision' ) )
THEN
259 ELSE IF( .NOT.( lsame( xtype,
'N' ) .OR. lsame( xtype,
'C' ) ) )
262 ELSE IF( ( sym .OR. tri ) .AND. .NOT.
263 $ ( lsame( uplo,
'U' ) .OR. lsame( uplo,
'L' ) ) )
THEN
265 ELSE IF( ( gen .OR. qrs ) .AND. .NOT.
266 $ ( tran .OR. lsame( trans,
'N' ) ) )
THEN
268 ELSE IF( m.LT.0 )
THEN
270 ELSE IF( n.LT.0 )
THEN
272 ELSE IF( band .AND. kl.LT.0 )
THEN
274 ELSE IF( band .AND. ku.LT.0 )
THEN
276 ELSE IF( nrhs.LT.0 )
THEN
278 ELSE IF( ( .NOT.band .AND. lda.LT.max( 1, m ) ) .OR.
279 $ ( band .AND. ( sym .OR. tri ) .AND. lda.LT.kl+1 ) .OR.
280 $ ( band .AND. gen .AND. lda.LT.kl+ku+1 ) )
THEN
282 ELSE IF( ( notran .AND. ldx.LT.max( 1, n ) ) .OR.
283 $ ( tran .AND. ldx.LT.max( 1, m ) ) )
THEN
285 ELSE IF( ( notran .AND. ldb.LT.max( 1, m ) ) .OR.
286 $ ( tran .AND. ldb.LT.max( 1, n ) ) )
THEN
290 CALL xerbla(
'SLARHS', -info )
303 IF( .NOT.lsame( xtype,
'C' ) )
THEN
305 CALL slarnv( 2, iseed, n, x( 1, j ) )
312 IF( lsamen( 2, c2,
'GE' ) .OR. lsamen( 2, c2,
'QR' ) .OR.
313 $ lsamen( 2, c2,
'LQ' ) .OR. lsamen( 2, c2,
'QL' ) .OR.
314 $ lsamen( 2, c2,
'RQ' ) )
THEN
318 CALL sgemm( trans,
'N', mb, nrhs, nx, one, a, lda, x, ldx,
321 ELSE IF( lsamen( 2, c2,
'PO' ) .OR. lsamen( 2, c2,
'SY' ) )
THEN
325 CALL ssymm(
'Left', uplo, n, nrhs, one, a, lda, x, ldx, zero,
328 ELSE IF( lsamen( 2, c2,
'GB' ) )
THEN
333 CALL sgbmv( trans, mb, nx, kl, ku, one, a, lda, x( 1, j ),
334 $ 1, zero, b( 1, j ), 1 )
337 ELSE IF( lsamen( 2, c2,
'PB' ) )
THEN
342 CALL ssbmv( uplo, n, kl, one, a, lda, x( 1, j ), 1, zero,
346 ELSE IF( lsamen( 2, c2,
'PP' ) .OR. lsamen( 2, c2,
'SP' ) )
THEN
351 CALL sspmv( uplo, n, one, a, x( 1, j ), 1, zero, b( 1, j ),
355 ELSE IF( lsamen( 2, c2,
'TR' ) )
THEN
361 CALL slacpy(
'Full', n, nrhs, x, ldx, b, ldb )
367 CALL strmm(
'Left', uplo, trans, diag, n, nrhs, one, a, lda, b,
370 ELSE IF( lsamen( 2, c2,
'TP' ) )
THEN
374 CALL slacpy(
'Full', n, nrhs, x, ldx, b, ldb )
381 CALL stpmv( uplo, trans, diag, n, a, b( 1, j ), 1 )
384 ELSE IF( lsamen( 2, c2,
'TB' ) )
THEN
388 CALL slacpy(
'Full', n, nrhs, x, ldx, b, ldb )
395 CALL stbmv( uplo, trans, diag, n, kl, a, lda, b( 1, j ), 1 )
403 CALL xerbla(
'SLARHS', -info )
subroutine slarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
SLARHS
subroutine xerbla(srname, info)
subroutine sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
SGBMV
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
SSBMV
subroutine ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
SSYMM
subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
SSPMV
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slarnv(idist, iseed, n, x)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx)
STBMV
subroutine stpmv(uplo, trans, diag, n, ap, x, incx)
STPMV
subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRMM