188 SUBROUTINE stbsv(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
196 CHARACTER DIAG,TRANS,UPLO
206 parameter(zero=0.0e+0)
210 INTEGER I,INFO,IX,J,JX,KPLUS1,KX,L
227 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
229 ELSE IF (.NOT.lsame(trans,
'N') .AND.
230 + .NOT.lsame(trans,
'T') .AND.
231 + .NOT.lsame(trans,
'C'))
THEN
233 ELSE IF (.NOT.lsame(diag,
'U') .AND.
234 + .NOT.lsame(diag,
'N'))
THEN
236 ELSE IF (n.LT.0)
THEN
238 ELSE IF (k.LT.0)
THEN
240 ELSE IF (lda.LT. (k+1))
THEN
242 ELSE IF (incx.EQ.0)
THEN
246 CALL xerbla(
'STBSV ',info)
254 nounit = lsame(diag,
'N')
261 ELSE IF (incx.NE.1)
THEN
268 IF (lsame(trans,
'N'))
THEN
272 IF (lsame(uplo,
'U'))
THEN
276 IF (x(j).NE.zero)
THEN
278 IF (nounit) x(j) = x(j)/a(kplus1,j)
280 DO 10 i = j - 1,max(1,j-k),-1
281 x(i) = x(i) - temp*a(l+i,j)
290 IF (x(jx).NE.zero)
THEN
293 IF (nounit) x(jx) = x(jx)/a(kplus1,j)
295 DO 30 i = j - 1,max(1,j-k),-1
296 x(ix) = x(ix) - temp*a(l+i,j)
306 IF (x(j).NE.zero)
THEN
308 IF (nounit) x(j) = x(j)/a(1,j)
310 DO 50 i = j + 1,min(n,j+k)
311 x(i) = x(i) - temp*a(l+i,j)
319 IF (x(jx).NE.zero)
THEN
322 IF (nounit) x(jx) = x(jx)/a(1,j)
324 DO 70 i = j + 1,min(n,j+k)
325 x(ix) = x(ix) - temp*a(l+i,j)
337 IF (lsame(uplo,
'U'))
THEN
343 DO 90 i = max(1,j-k),j - 1
344 temp = temp - a(l+i,j)*x(i)
346 IF (nounit) temp = temp/a(kplus1,j)
355 DO 110 i = max(1,j-k),j - 1
356 temp = temp - a(l+i,j)*x(ix)
359 IF (nounit) temp = temp/a(kplus1,j)
362 IF (j.GT.k) kx = kx + incx
370 DO 130 i = min(n,j+k),j + 1,-1
371 temp = temp - a(l+i,j)*x(i)
373 IF (nounit) temp = temp/a(1,j)
383 DO 150 i = min(n,j+k),j + 1,-1
384 temp = temp - a(l+i,j)*x(ix)
387 IF (nounit) temp = temp/a(1,j)
390 IF ((n-j).GE.k) kx = kx - incx
subroutine xerbla(srname, info)
subroutine stbsv(uplo, trans, diag, n, k, a, lda, x, incx)
STBSV