Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

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

lapack_int LAPACKE_sgbsv (int matrix_layout , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , float * ab , lapack_int ldab , lapack_int * ipiv , float * b , lapack_int ldb );

lapack_int LAPACKE_dgbsv (int matrix_layout , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , double * ab , lapack_int ldab , lapack_int * ipiv , double * b , lapack_int ldb );

lapack_int LAPACKE_cgbsv (int matrix_layout , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , lapack_complex_float * ab , lapack_int ldab , lapack_int * ipiv , lapack_complex_float * b , lapack_int ldb );

lapack_int LAPACKE_zgbsv (int matrix_layout , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , lapack_complex_double * ab , lapack_int ldab , lapack_int * ipiv , lapack_complex_double * b , lapack_int ldb );

Include Files

  • mkl.h

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

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)), bof 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 2kl + ku +1)

ldb

The leading dimension of b; ldb max(1, n) for column major layout and ldbnrhs 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-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.