Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

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

Document Table of Contents

?ptsv

Computes the solution to the system of linear equations with a symmetric or Hermitian positive definite tridiagonal coefficient matrix A and multiple right-hand sides.

Syntax

lapack_int LAPACKE_sptsv( int matrix_layout, lapack_int n, lapack_int nrhs, float* d, float* e, float* b, lapack_int ldb );

lapack_int LAPACKE_dptsv( int matrix_layout, lapack_int n, lapack_int nrhs, double* d, double* e, double* b, lapack_int ldb );

lapack_int LAPACKE_cptsv( int matrix_layout, lapack_int n, lapack_int nrhs, float* d, lapack_complex_float* e, lapack_complex_float* b, lapack_int ldb );

lapack_int LAPACKE_zptsv( int matrix_layout, lapack_int n, lapack_int nrhs, double* d, lapack_complex_double* e, 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 symmetric/Hermitian positive-definite tridiagonal matrix, the columns of matrix B are individual right-hand sides, and the columns of X are the corresponding solutions.

A is factored as A = L*D*LT (real flavors) or A = L*D*LH (complex flavors), and 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 matrix A; n 0.

nrhs

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

d

Array, dimension at least max(1, n). Contains the diagonal elements of the tridiagonal matrix A.

e, b

Arrays: e (size n - 1), bof size max(1, ldb*nrhs) for column major layout and max(1, ldb*n) for row major layout. The array e contains the (n - 1) subdiagonal elements of A.

The array b contains the matrix B whose columns are the right-hand sides for the systems of equations.

ldb

The leading dimension of b; ldb max(1, n) for column major layout and ldbnrhs for row major layout.

Output Parameters

d

Overwritten by the n diagonal elements of the diagonal matrix D from the L*D*LT (real)/ L*D*LH (complex) factorization of A.

e

Overwritten by the (n - 1) subdiagonal elements of the unit bidiagonal factor L from the factorization of A.

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.

If info = i, the leading minor of order i (and therefore the matrix A itself) is not positive-definite, and the solution has not been computed. The factorization has not been completed unless i = n.