sgbmv(3S)
SGBMV, DGBMV, CGBMV, ZGMBV - Multiplies a real or complex vector by a real or complex general band matrix
As shipped in IRIX 6.5.19. Added in IRIX 6.5.15.
NAME SGBMV, DGBMV, CGBMV, ZGMBV - Multiplies a real or complex vector by a real or complex general band matrix SYNOPSIS Single precision Fortran: CALL SGBMV (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) C/C++: #include <scsl_blas.h> void sgbmv(char *transa, int m, int n, int kl, int ku, float alpha, float *a, int lda, float *x, int incx, float beta, float *y, int incy); Double precision Fortran: CALL DGBMV (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) C/C++: #include <scsl_blas.h> void dgbmv(char *transa, int m, int n, int kl, int ku, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); Single precision complex Fortran: CALL CGBMV (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) C/C++: #include <scsl_blas.h> void cgbmv(char *transa, int m, int n, int kl, int ku, scsl_complex *alpha, scsl_complex *a, int lda, scsl_complex *x, int incx, scsl_complex *beta, scsl_complex *y, int incy); C++ STL: #include <complex.h> #include <scsl_blas.h> void cgbmv(char *transa, int m, int n, int kl, int ku, complex<float> *alpha, complex<float> *a, int lda, complex<float> *x, int incx, complex<float> *beta, complex<float> *y, int incy); Double precision complex Fortran: CALL ZGBMV (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) C/C++: #include <scsl_blas.h> void zgbmv(char *transa, int m, int n, int kl, int ku, scsl_zomplex *alpha, scsl_zomplex *a, int lda, scsl_zomplex *x, int incx, scsl_zomplex *beta, scsl_zomplex *y, int incy); C++ STL: #include <complex.h> #include <scsl_blas.h> void zgbmv(char *transa, int m, int n, int kl, int ku, complex<double> *alpha, complex<double> *a, int lda, complex<double> *x, int incx, complex<double> *beta, complex<double> *y, int incy); IMPLEMENTATION These routines are part of the SCSL Scientific Library and can be loaded using either the -lscs or the -lscs_mp option. The -lscs_mp option directs the linker to use the multi-processor version of the library. When linking to SCSL with -lscs or -lscs_mp, the default integer size is 4 bytes (32 bits). Another version of SCSL is available in which integers are 8 bytes (64 bits). This version allows the user access to larger memory sizes and helps when porting legacy Cray codes. It can be loaded by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use only one of the two versions; 4-byte integer and 8-byte integer library calls cannot be mixed. The C and C++ prototypes shown above are appropriate for the 4-byte integer version of SCSL. When using the 8-byte integer version, the variables of type int become long long and the <scsl_blas_i8.h> header file should be included. DESCRIPTION SGBMV and DGBMV multiply a real vector by a real general band matrix. CGBMV and ZGBMV multiply a complex vector by a complex general band matrix. These routines perform one of the following matrix-vector operations: y <- alpha Ax + beta y y <- alpha ATx + beta y y <- alpha AHx + beta y where * alpha and beta are scalars, * x and y are vectors * A is an m-by-n band matrix with kl subdiagonals and ku superdiagonals * AT is the transpose of A * AH is the conjugate transpose of A See the NOTES section of this man page for information about the interpretation of the data types described in the following arguments. These routines have the following arguments: trans Character. (input) Specifies the operation to be performed: trans = 'N' or 'n': y <- alpha Ax + beta y trans = 'T' or 't': y <- alpha ATx + beta y trans = 'C' or 'c': y <- alpha ATx + beta y (SGBMV, DGBMV) or y <- alpha AHx + beta y (CGBMV, ZGBMV) For C/C++, a pointer to this character is passed. m Integer. (input) Specifies the number of rows in matrix A. m >= 0. n Integer. (input) Specifies the number of columns in the matrix A. n >= 0. kl Integer. (input) Specifies the number of subdiagonals of matrix A. kl >= 0. ku Integer. (input) Specifies the number of superdiagonals of matrix A. ku >= 0. alpha Scalar alpha. (input) SGBMV: Single precision. DGBMV: Double precision. CGBMV: Single precision complex. ZGBMV: Double precision complex. For C/C++, a pointer to this scalar is passed when alpha is complex; otherwise, alpha is passed by value. a Array of dimension (lda, n). (input) SGBMV: Single precision array. DGBMV: Double precision array. CGBMV: Single precision complex array. ZGBMV: Double precision complex array. Before entry, the leading (kl+ku+1)-by-n part of array a must contain the matrix of coefficients, supplied column-by-column, with the leading diagonal of the matrix in row (ku+1) of the array, the first superdiagonal starting at position 2 in row ku, the first subdiagonal starting at position 1 in row (ku+2), and so on. Elements in array a that do not correspond to elements in the band matrix (such as the top left ku-by-ku triangle) are not referenced. See the NOTES section for an example of Fortran code that transfers a band matrix from conventional full matrix storage to band storage. lda Integer. (input) Specifies the first dimension of a as declared in the calling program. lda >= (kl+ku+1). x Array of dimension 1+(kx-1) * |incx|. (input) SGBMV: Single precision array. DGBMV: Double precision array. CGBMV: Single precision complex array. ZGBMV: Double precision complex array. Contains the vector x. When trans = 'N' or 'n', kx is n; otherwise, it is m. incx Integer. (input) Specifies the increment for the elements of x. incx must not be 0. beta Scalar beta. (input) SGBMV: Single precision. DGBMV: Double precision. CGBMV: Single precision complex. ZGBMV: Double precision complex. When beta is supplied as 0, y need not be set on input. For C/C++, a pointer to this scalar is passed when beta is complex; otherwise, beta is passed by value. y Array of dimension 1+(ky-1) * |incy|. (input and output) SGBMV: Single precision array. DGBMV: Double precision array. CGBMV: Single precision complex array. ZGBMV: Double precision complex array. Contains the vector y. When trans = 'N' or 'n', ky is m; otherwise, it is n. On exit, the updated vector overwrites array y. incy Integer. (input) Specifies the increment for the elements of y. incy must not be 0. NOTES The following program segment transfers a band matrix from conventional full matrix storage to band storage: DO 20, J = 1, N K = KU + 1 - J DO 10, I = MAX(1, J - KU), MIN(M, J + KL) A(K + I, J) = MATRIX(I, J) 10 CONTINUE 20 CONTINUE SGBMV, DGBMV, ZGBMV and CGBMV are Level 2 Basic Linear Algebra Subprograms (Level 2 BLAS). When working backward (incx < 0 or incy < 0), each routine starts at the end of the vector and moves backward, as follows: x(1-incx * n-1)), x(1-incx * (n-2)) , ..., x(1) y(1-incy * (n-1)), y(1-incy * (n-2)) , ..., y(1) Data Types The following data types are described in this documentation: Term Used Data type Fortran: Array dimensioned n x(n) Array of dimensions (m,n) x(m,n) Character CHARACTER Integer INTEGER (INTEGER*8 for -lscs_i8[_mp]) Single precision REAL Double precision DOUBLE PRECISION Single precision complex COMPLEX Double precision complex DOUBLE COMPLEX C/C++: Array dimensioned n x[n] Array of dimensions (m,n) x[m*n] Character char Integer int (long long for -lscs_i8[_mp]) Single precision float Double precision double Single precision complex scsl_complex Double precision complex scsl_zomplex C++ STL: Array dimensioned n x[n] Array of dimensions (m,n) x[m*n] Character char Integer int (long long for -lscs_i8[_mp]) Single precision float Double precision double Single precision complex complex<float> Double precision complex complex<double> Note that you can explicitly declare multidimensional C/C++ arrays provided that the array dimensions are swapped with respect to the Fortran declaration (e.g., x[n][m] in C/C++ versus x(m,n) in Fortran). To avoid a compiler type mismatch error in C++ (or a compiler warning message in C), however, the array should be cast to a pointer of the appropriate type when passed as an argument to a SCSL routine. SEE ALSO INTRO_SCSL(3S), INTRO_BLAS2(3S) INTRO_CBLAS(3S) for information about using the C interface to Fortran 77 Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic Linear Algebra Subprograms Technical Forum.