Developer Reference for Intel® oneAPI Math Kernel Library for C
?gbsv
Computes the solution to the system of linear equations with a band coefficient matrix A and multiple right-hand sides.
Syntax
lapack_intLAPACKE_sgbsv ( intmatrix_layout , lapack_intn , lapack_intkl , lapack_intku , lapack_intnrhs , float*ab , lapack_intldab , lapack_int*ipiv , float*b , lapack_intldb );
lapack_intLAPACKE_dgbsv ( intmatrix_layout , lapack_intn , lapack_intkl , lapack_intku , lapack_intnrhs , double*ab , lapack_intldab , lapack_int*ipiv , double*b , lapack_intldb );
lapack_intLAPACKE_cgbsv ( intmatrix_layout , lapack_intn , lapack_intkl , lapack_intku , lapack_intnrhs , lapack_complex_float*ab , lapack_intldab , lapack_int*ipiv , lapack_complex_float*b , lapack_intldb );
lapack_intLAPACKE_zgbsv ( intmatrix_layout , lapack_intn , lapack_intkl , lapack_intku , lapack_intnrhs , lapack_complex_double*ab , lapack_intldab , lapack_int*ipiv , lapack_complex_double*b , lapack_intldb );
Include Files
mkl.h
Description
sgbsv dgbsv cgbsv zgbsv gbsv
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
matrix_layout
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
n
The order of A . The number of rows in B ; n ≥ 0.
kl
The number of subdiagonals within the band of A ; kl ≥ 0.
ku
The number of superdiagonals within the band of A ; ku ≥ 0.
nrhs
The number of right-hand sides. The number of columns in B ; nrhs ≥ 0.
ab , b
Arrays: ab (size max(1, ldab * n )) , b of size max(1, ldb * nrhs ) for column major layout and max(1, ldb * n ) for row major layout .
The array ab contains the matrix A in band storage (see Matrix Storage Schemes ).
The array b contains the matrix B whose columns are the right-hand sides for the systems of equations.
ldab
The leading dimension of the array ab . ( ldab ≥ 2 kl + ku +1)
ldb
The leading dimension of b ; ldb≥ max(1, n)ldb ≥ max(1, n ) for column major layout and ldb ≥ nrhs for row major layout .
Output Parameters
ab
Overwritten by L and U . U is stored as an upper triangular band matrix with kl + ku superdiagonals and L is stored as a lower triangular band matrix with kl subdiagonals. See Matrix Storage Schemes .
b
Overwritten by the solution matrix X .
ipiv
Array, size at least max(1, n) . The pivot indices: row i was interchanged with row ipiv(i)ipiv[i-1] .
Return Values
This function returns a value info .
If info = 0 , the execution is successful.
If info = -i , parameter i had an illegal value.
If info = i , Ui, 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
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.