Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 6/24/2024
Public

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

Document Table of Contents

?gbtrs

Solves a system of linear equations with an LU-factored band coefficient matrix, with multiple right-hand sides.

Syntax

lapack_int LAPACKE_sgbtrs (int matrix_layout , char trans , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , const float * ab , lapack_int ldab , const lapack_int * ipiv , float * b , lapack_int ldb );

lapack_int LAPACKE_dgbtrs (int matrix_layout , char trans , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , const double * ab , lapack_int ldab , const lapack_int * ipiv , double * b , lapack_int ldb );

lapack_int LAPACKE_cgbtrs (int matrix_layout , char trans , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , const lapack_complex_float * ab , lapack_int ldab , const lapack_int * ipiv , lapack_complex_float * b , lapack_int ldb );

lapack_int LAPACKE_zgbtrs (int matrix_layout , char trans , lapack_int n , lapack_int kl , lapack_int ku , lapack_int nrhs , const lapack_complex_double * ab , lapack_int ldab , const lapack_int * ipiv , lapack_complex_double * b , lapack_int ldb );

Include Files

  • mkl.h

Description

The routine solves for X the following systems of linear equations:

A*X = B

if trans='N',

AT*X = B

if trans='T',

AH*X = B

if trans='C' (for complex matrices only).

Here A is an LU-factored general band matrix of order n with kl non-zero subdiagonals and ku nonzero superdiagonals. Before calling this routine, call ?gbtrf to compute the LU factorization of A.

Input Parameters

matrix_layout

Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).

trans

Must be 'N' or 'T' or 'C'.

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; nrhs≥ 0.

ab

Array ab size max(1, ldab*n)

The array ab contains elements of the LU factors of the matrix A as returned by gbtrf.

b

Array b size max(1, ldb*nrhs) for column major layout and max(1, ldb*n) for row major layout.

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) for column major layout and ldb≥nrhs for row major layout.

ipiv

Array, size at least max(1, n). The ipiv array, as returned by ?gbtrf.

Output Parameters

b

Overwritten by the solution matrix X.

Return Values

This function returns a value info.

If info=0, the execution is successful.

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

Application Notes

For each right-hand side b, the computed solution is the exact solution of a perturbed system of equations (A + E)x = b, where

|E| ≤ c(kl + ku + 1)ε P|L||U|

c(k) is a modest linear function of k, and ε is the machine precision.

If x0 is the true solution, the computed solution x satisfies this error bound:


Equation

where cond(A,x)= || |A-1||A| |x| ||∞ / ||x||∞≤ ||A-1||∞ ||A||∞ = κ∞(A).

Note that cond(A,x) can be much smaller than κ∞(A); the condition number of AT and AH might or might not be equal to κ∞(A).

The approximate number of floating-point operations for one right-hand side vector is 2n(ku + 2kl) for real flavors. The number of operations for complex flavors is 4 times greater. All these estimates assume that kl and ku are much less than min(m,n).

To estimate the condition number κ∞(A), call ?gbcon.

To refine the solution and estimate the error, call ?gbrfs.