SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from openSUSE Leap 15 blas-man-3.5.0-lp150.20.1.noarch.rpm

ctbsv.f

Section: LAPACK (3)
Updated: Thu Mar 29 2018
Index 

NAME

ctbsv.f 

SYNOPSIS


 

Functions/Subroutines


subroutine CTBSV (UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
CTBSV  

Function/Subroutine Documentation

 

subroutine CTBSV (character UPLO, character TRANS, character DIAG, integer N, integer K, complex, dimension(lda,*) A, integer LDA, complex, dimension(*) X, integer INCX)

CTBSV

Purpose:

 CTBSV  solves one of the systems of equations    A*x = b,   or   A**T*x = b,   or   A**H*x = b, where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals. No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.


 

Parameters:

UPLO

          UPLO is CHARACTER*1           On entry, UPLO specifies whether the matrix is an upper or           lower triangular matrix as follows:              UPLO = 'U' or 'u'   A is an upper triangular matrix.              UPLO = 'L' or 'l'   A is a lower triangular matrix.


TRANS

          TRANS is CHARACTER*1           On entry, TRANS specifies the equations to be solved as           follows:              TRANS = 'N' or 'n'   A*x = b.              TRANS = 'T' or 't'   A**T*x = b.              TRANS = 'C' or 'c'   A**H*x = b.


DIAG

          DIAG is CHARACTER*1           On entry, DIAG specifies whether or not A is unit           triangular as follows:              DIAG = 'U' or 'u'   A is assumed to be unit triangular.              DIAG = 'N' or 'n'   A is not assumed to be unit                                  triangular.


N

          N is INTEGER           On entry, N specifies the order of the matrix A.           N must be at least zero.


K

          K is INTEGER           On entry with UPLO = 'U' or 'u', K specifies the number of           super-diagonals of the matrix A.           On entry with UPLO = 'L' or 'l', K specifies the number of           sub-diagonals of the matrix A.           K must satisfy  0 .le. K.


A

          A is COMPLEX array of DIMENSION ( LDA, n ).           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )           by n part of the array A must contain the upper triangular           band part of the matrix of coefficients, supplied column by           column, with the leading diagonal of the matrix in row           ( k + 1 ) of the array, the first super-diagonal starting at           position 2 in row k, and so on. The top left k by k triangle           of the array A is not referenced.           The following program segment will transfer an upper           triangular band matrix from conventional full matrix storage           to band storage:                 DO 20, J = 1, N                    M = K + 1 - J                    DO 10, I = MAX( 1, J - K ), J                       A( M + I, J ) = matrix( I, J )              10    CONTINUE              20 CONTINUE           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )           by n part of the array A must contain the lower triangular           band part of the matrix of coefficients, supplied column by           column, with the leading diagonal of the matrix in row 1 of           the array, the first sub-diagonal starting at position 1 in           row 2, and so on. The bottom right k by k triangle of the           array A is not referenced.           The following program segment will transfer a lower           triangular band matrix from conventional full matrix storage           to band storage:                 DO 20, J = 1, N                    M = 1 - J                    DO 10, I = J, MIN( N, J + K )                       A( M + I, J ) = matrix( I, J )              10    CONTINUE              20 CONTINUE           Note that when DIAG = 'U' or 'u' the elements of the array A           corresponding to the diagonal elements of the matrix are not           referenced, but are assumed to be unity.


LDA

          LDA is INTEGER           On entry, LDA specifies the first dimension of A as declared           in the calling (sub) program. LDA must be at least           ( k + 1 ).


X

          X is COMPLEX array of dimension at least           ( 1 + ( n - 1 )*abs( INCX ) ).           Before entry, the incremented array X must contain the n           element right-hand side vector b. On exit, X is overwritten           with the solution vector x.


INCX

          INCX is INTEGER           On entry, INCX specifies the increment for the elements of           X. INCX must not be zero.


 

Author:

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Date:

November 2011

Further Details:

  Level 2 Blas routine.  -- Written on 22-October-1986.     Jack Dongarra, Argonne National Lab.     Jeremy Du Croz, Nag Central Office.     Sven Hammarling, Nag Central Office.     Richard Hanson, Sandia National Labs.


 

Definition at line 191 of file ctbsv.f.

191 *192 *  -- Reference BLAS level2 routine (version 3.4.0) --193 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --194 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--195 *     November 2011196 *197 *     .. Scalar Arguments ..198       INTEGER INCX,K,LDA,N199       CHARACTER DIAG,TRANS,UPLO200 *     ..201 *     .. Array Arguments ..202       COMPLEX A(LDA,*),X(*)203 *     ..204 *205 *  =====================================================================206 *207 *     .. Parameters ..208       COMPLEX ZERO209       parameter(zero= (0.0e+0,0.0e+0))210 *     ..211 *     .. Local Scalars ..212       COMPLEX TEMP213       INTEGER I,INFO,IX,J,JX,KPLUS1,KX,L214       LOGICAL NOCONJ,NOUNIT215 *     ..216 *     .. External Functions ..217       LOGICAL LSAME218       EXTERNAL lsame219 *     ..220 *     .. External Subroutines ..221       EXTERNAL xerbla222 *     ..223 *     .. Intrinsic Functions ..224       INTRINSIC conjg,max,min225 *     ..226 *227 *     Test the input parameters.228 *229       info = 0230       IF (.NOT.lsame(uplo,'U') .AND. .NOT.lsame(uplo,'L')) THEN231           info = 1232       ELSE IF (.NOT.lsame(trans,'N') .AND. .NOT.lsame(trans,'T') .AND.233      +         .NOT.lsame(trans,'C')) THEN234           info = 2235       ELSE IF (.NOT.lsame(diag,'U') .AND. .NOT.lsame(diag,'N')) THEN236           info = 3237       ELSE IF (n.LT.0) THEN238           info = 4239       ELSE IF (k.LT.0) THEN240           info = 5241       ELSE IF (lda.LT. (k+1)) THEN242           info = 7243       ELSE IF (incx.EQ.0) THEN244           info = 9245       END IF246       IF (info.NE.0) THEN247           CALL xerbla('CTBSV ',info)248           RETURN249       END IF250 *251 *     Quick return if possible.252 *253       IF (n.EQ.0) RETURN254 *255       noconj = lsame(trans,'T')256       nounit = lsame(diag,'N')257 *258 *     Set up the start point in X if the increment is not unity. This259 *     will be  ( N - 1 )*INCX  too small for descending loops.260 *261       IF (incx.LE.0) THEN262           kx = 1 - (n-1)*incx263       ELSE IF (incx.NE.1) THEN264           kx = 1265       END IF266 *267 *     Start the operations. In this version the elements of A are268 *     accessed by sequentially with one pass through A.269 *270       IF (lsame(trans,'N')) THEN271 *272 *        Form  x := inv( A )*x.273 *274           IF (lsame(uplo,'U')) THEN275               kplus1 = k + 1276               IF (incx.EQ.1) THEN277                   DO 20 j = n,1,-1278                       IF (x(j).NE.zero) THEN279                           l = kplus1 - j280                           IF (nounit) x(j) = x(j)/a(kplus1,j)281                           temp = x(j)282                           DO 10 i = j - 1,max(1,j-k),-1283                               x(i) = x(i) - temp*a(l+i,j)284    10                     CONTINUE285                       END IF286    20             CONTINUE287               ELSE288                   kx = kx + (n-1)*incx289                   jx = kx290                   DO 40 j = n,1,-1291                       kx = kx - incx292                       IF (x(jx).NE.zero) THEN293                           ix = kx294                           l = kplus1 - j295                           IF (nounit) x(jx) = x(jx)/a(kplus1,j)296                           temp = x(jx)297                           DO 30 i = j - 1,max(1,j-k),-1298                               x(ix) = x(ix) - temp*a(l+i,j)299                               ix = ix - incx300    30                     CONTINUE301                       END IF302                       jx = jx - incx303    40             CONTINUE304               END IF305           ELSE306               IF (incx.EQ.1) THEN307                   DO 60 j = 1,n308                       IF (x(j).NE.zero) THEN309                           l = 1 - j310                           IF (nounit) x(j) = x(j)/a(1,j)311                           temp = x(j)312                           DO 50 i = j + 1,min(n,j+k)313                               x(i) = x(i) - temp*a(l+i,j)314    50                     CONTINUE315                       END IF316    60             CONTINUE317               ELSE318                   jx = kx319                   DO 80 j = 1,n320                       kx = kx + incx321                       IF (x(jx).NE.zero) THEN322                           ix = kx323                           l = 1 - j324                           IF (nounit) x(jx) = x(jx)/a(1,j)325                           temp = x(jx)326                           DO 70 i = j + 1,min(n,j+k)327                               x(ix) = x(ix) - temp*a(l+i,j)328                               ix = ix + incx329    70                     CONTINUE330                       END IF331                       jx = jx + incx332    80             CONTINUE333               END IF334           END IF335       ELSE336 *337 *        Form  x := inv( A**T )*x  or  x := inv( A**H )*x.338 *339           IF (lsame(uplo,'U')) THEN340               kplus1 = k + 1341               IF (incx.EQ.1) THEN342                   DO 110 j = 1,n343                       temp = x(j)344                       l = kplus1 - j345                       IF (noconj) THEN346                           DO 90 i = max(1,j-k),j - 1347                               temp = temp - a(l+i,j)*x(i)348    90                     CONTINUE349                           IF (nounit) temp = temp/a(kplus1,j)350                       ELSE351                           DO 100 i = max(1,j-k),j - 1352                               temp = temp - conjg(a(l+i,j))*x(i)353   100                     CONTINUE354                           IF (nounit) temp = temp/conjg(a(kplus1,j))355                       END IF356                       x(j) = temp357   110             CONTINUE358               ELSE359                   jx = kx360                   DO 140 j = 1,n361                       temp = x(jx)362                       ix = kx363                       l = kplus1 - j364                       IF (noconj) THEN365                           DO 120 i = max(1,j-k),j - 1366                               temp = temp - a(l+i,j)*x(ix)367                               ix = ix + incx368   120                     CONTINUE369                           IF (nounit) temp = temp/a(kplus1,j)370                       ELSE371                           DO 130 i = max(1,j-k),j - 1372                               temp = temp - conjg(a(l+i,j))*x(ix)373                               ix = ix + incx374   130                     CONTINUE375                           IF (nounit) temp = temp/conjg(a(kplus1,j))376                       END IF377                       x(jx) = temp378                       jx = jx + incx379                       IF (j.GT.k) kx = kx + incx380   140             CONTINUE381               END IF382           ELSE383               IF (incx.EQ.1) THEN384                   DO 170 j = n,1,-1385                       temp = x(j)386                       l = 1 - j387                       IF (noconj) THEN388                           DO 150 i = min(n,j+k),j + 1,-1389                               temp = temp - a(l+i,j)*x(i)390   150                     CONTINUE391                           IF (nounit) temp = temp/a(1,j)392                       ELSE393                           DO 160 i = min(n,j+k),j + 1,-1394                               temp = temp - conjg(a(l+i,j))*x(i)395   160                     CONTINUE396                           IF (nounit) temp = temp/conjg(a(1,j))397                       END IF398                       x(j) = temp399   170             CONTINUE400               ELSE401                   kx = kx + (n-1)*incx402                   jx = kx403                   DO 200 j = n,1,-1404                       temp = x(jx)405                       ix = kx406                       l = 1 - j407                       IF (noconj) THEN408                           DO 180 i = min(n,j+k),j + 1,-1409                               temp = temp - a(l+i,j)*x(ix)410                               ix = ix - incx411   180                     CONTINUE412                           IF (nounit) temp = temp/a(1,j)413                       ELSE414                           DO 190 i = min(n,j+k),j + 1,-1415                               temp = temp - conjg(a(l+i,j))*x(ix)416                               ix = ix - incx417   190                     CONTINUE418                           IF (nounit) temp = temp/conjg(a(1,j))419                       END IF420                       x(jx) = temp421                       jx = jx - incx422                       IF ((n-j).GE.k) kx = kx - incx423   200             CONTINUE424               END IF425           END IF426       END IF427 *428       RETURN429 *430 *     End of CTBSV .431 *
 

Author

Generated automatically by Doxygen for LAPACK from the source code.


 

Index

NAME
SYNOPSIS
Functions/Subroutines
Function/Subroutine Documentation
subroutine CTBSV (character UPLO, character TRANS, character DIAG, integer N, integer K, complex, dimension(lda,*) A, integer LDA, complex, dimension(*) X, integer INCX)
Author

This document was created byman2html,using the manual pages.