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

p?trtrs

Solves a system of linear equations with a triangular distributed matrix.

Syntax

void pstrtrs (char *uplo , char *trans , char *diag , MKL_INT *n , MKL_INT *nrhs , float *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , float *b , MKL_INT *ib , MKL_INT *jb , MKL_INT *descb , MKL_INT *info );

void pdtrtrs (char *uplo , char *trans , char *diag , MKL_INT *n , MKL_INT *nrhs , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , double *b , MKL_INT *ib , MKL_INT *jb , MKL_INT *descb , MKL_INT *info );

void pctrtrs (char *uplo , char *trans , char *diag , MKL_INT *n , MKL_INT *nrhs , MKL_Complex8 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_Complex8 *b , MKL_INT *ib , MKL_INT *jb , MKL_INT *descb , MKL_INT *info );

void pztrtrs (char *uplo , char *trans , char *diag , MKL_INT *n , MKL_INT *nrhs , MKL_Complex16 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_Complex16 *b , MKL_INT *ib , MKL_INT *jb , MKL_INT *descb , MKL_INT *info );

Include Files

  • mkl_scalapack.h

Description

The p?trtrsfunction solves for X one of the following systems of linear equations:

sub(A)*X = sub(B),

(sub(A))T*X = sub(B), or

(sub(A))H*X = sub(B),

where sub(A) = A(ia:ia+n-1, ja:ja+n-1) is a triangular distributed matrix of order n, and sub(B) denotes the distributed matrix B(ib:ib+n-1, jb:jb+nrhs-1).

A check is made to verify that sub(A) is nonsingular.

Input Parameters

uplo

(global) Must be 'U' or 'L'.

Indicates whether sub(A) is upper or lower triangular:

If uplo = 'U', then sub(A) is upper triangular.

If uplo = 'L', then sub(A) is lower triangular.

trans

(global) Must be 'N' or 'T' or 'C'.

Indicates the form of the equations:

If trans = 'N', then sub(A)*X = sub(B) is solved for X.

If trans = 'T', then sub(A)T*X = sub(B) is solved for X.

If trans = 'C', then sub(A)H*X = sub(B) is solved for X.

diag

(global) Must be 'N' or 'U'.

If diag = 'N', then sub(A) is not a unit triangular matrix.

If diag = 'U', then sub(A) is unit triangular.

n

(global) The order of the distributed matrix sub(A) (n0).

nrhs

(global) The number of right-hand sides; i.e., the number of columns of the distributed matrix sub(B) (nrhs0).

a, b

(local)

Pointers into the local memory to arrays of local sizes lld_a*LOCc(ja+n-1) and lld_b*LOCc(jb+nrhs-1), respectively.

The array a contains the local pieces of the distributed triangular matrix sub(A).

If uplo = 'U', the leading n-by-n upper triangular part of sub(A) contains the upper triangular matrix, and the strictly lower triangular part of sub(A) is not referenced.

If uplo = 'L', the leading n-by-n lower triangular part of sub(A) contains the lower triangular matrix, and the strictly upper triangular part of sub(A) is not referenced.

If diag = 'U', the diagonal elements of sub(A) are also not referenced and are assumed to be 1.

On entry, the array b contains the local pieces of the right hand side distributed matrix sub(B).

ia, ja

(global) The row and column indices in the global matrix A indicating the first row and the first column of the matrix sub(A), respectively.

desca

(global and local) array of size dlen_. The array descriptor for the distributed matrix A.

ib, jb

(global) The row and column indices in the global matrix B indicating the first row and the first column of the matrix sub(B), respectively.

descb

(global and local) array of size dlen_. The array descriptor for the distributed matrix B.

Output Parameters

b

On exit, if info=0, sub(B) is overwritten by the solution matrix X.

info

If info=0, the execution is successful.

info < 0:

if the i-th argument is an array and the j-th entry, indexed j - 1, had an illegal value, then info = -(i*100+j); if the i-th argument is a scalar and had an illegal value, then info = -i.

info> 0:

if info = i, the i-th diagonal element of sub(A) is zero, indicating that the submatrix is singular and the solutions X have not been computed.

See Also