Solves a system of distributed linear equations with a general square matrix, using the LU factorization computed by p?getrf.

Syntax

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

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

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

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

Include Files

  • mkl_scalapack.h

Description

The p?getrsfunction solves a system of distributed linear equations with a general n-by-n distributed matrix sub(A) = A(ia:ia+n-1, ja:ja+n-1) using the LU factorization computed by p?getrf.

The system has one of the following forms specified by trans:

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

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

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

where sub(B) = B(ib:ib+n-1, jb:jb+nrhs-1).

Before calling this function,you must call p?getrf to compute the LU factorization of sub(A).

Input Parameters

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.

n

(global) The number of linear equations; the order of the matrix sub(A) (n0).

nrhs

(global) The number of right hand sides; 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.

On entry, the array a contains the local pieces of the factors L and U from the factorization sub(A) = P*L*U; the unit diagonal elements of L are not stored. On entry, the array b contains the right hand sides 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.

ipiv

(local) Array of size of LOCr(m_a) + mb_a. Contains the pivoting information: local row i of the matrix was interchanged with the global row ipiv[i-1].

This array is tied to 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, overwritten by the solution distributed 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.

See Also

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.
Selecione a cor do botão adesivo: 
Orange (only for download buttons)