Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 10/31/2024
Public
Document Table of Contents

?gbsv

Computes the solution to the system of linear equations with a band coefficient matrix A and multiple right-hand sides.

Syntax

call sgbsv( n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info )

call dgbsv( n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info )

call cgbsv( n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info )

call zgbsv( n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info )

call gbsv( ab, b [,kl] [,ipiv] [,info] )

Include Files

  • mkl.fi, mkl_lapack.f90

Description

The routine solves for X the real or complex system of linear equations A*X = B, where A is an n-by-n band matrix with kl subdiagonals and ku superdiagonals, the columns of matrix B are individual right-hand sides, and the columns of X are the corresponding solutions.

The LU decomposition with partial pivoting and row interchanges is used to factor A as A = L*U, where L is a product of permutation and unit lower triangular matrices with kl subdiagonals, and U is upper triangular with kl+ku superdiagonals. The factored form of A is then used to solve the system of equations A*X = B.

Input Parameters

n

INTEGER. The order of A. The number of rows in B; n 0.

kl

INTEGER. The number of subdiagonals within the band of A; kl 0.

ku

INTEGER. The number of superdiagonals within the band of A; ku 0.

nrhs

INTEGER. The number of right-hand sides. The number of columns in B; nrhs 0.

ab, b

REAL for sgbsv

DOUBLE PRECISION for dgbsv

COMPLEX for cgbsv

DOUBLE COMPLEX for zgbsv.

Arrays: ab(size ldab by *), b(size ldb by *).

The array ab contains the matrix A in band storage (see Matrix Storage Schemes). The second dimension of ab must be at least max(1, n).

The array b contains the matrix B whose columns are the right-hand sides for the systems of equations. The second dimension of b must be at least max(1,nrhs).

ldab

INTEGER. The leading dimension of the array ab. (ldab 2kl + ku +1)

ldb

INTEGER. The leading dimension of b; ldb max(1, n).

Output Parameters

ab

Overwritten by L and U. The diagonal and kl + ku superdiagonals of U are stored in the first 1 + kl + ku rows of ab. The multipliers used to form L are stored in the next kl rows.

b

Overwritten by the solution matrix X.

ipiv

INTEGER.

Array, size at least max(1, n). The pivot indices: row i was interchanged with row ipiv(i).

info

INTEGER. If info = 0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

If info = i, U(i, i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed.

LAPACK 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see LAPACK 95 Interface Conventions.

Specific details for the routine gbsv interface are as follows:

ab

Holds the array A of size (2*kl+ku+1,n).

b

Holds the matrix B of size (n,nrhs).

ipiv

Holds the vector of length n.

kl

If omitted, assumed kl = ku.

ku

Restored as ku = lda-2*kl-1.