# p?laqsy

Scales a symmetric/Hermitian matrix, using scaling factors computed by p?poequ .

## Syntax

call pslaqsy(uplo, n, a, ia, ja, desca, sr, sc, scond, amax, equed)

call pdlaqsy(uplo, n, a, ia, ja, desca, sr, sc, scond, amax, equed)

call pclaqsy(uplo, n, a, ia, ja, desca, sr, sc, scond, amax, equed)

call pzlaqsy(uplo, n, a, ia, ja, desca, sr, sc, scond, amax, equed)

## Description

This routine equilibrates a symmetric distributed matrix `sub(A) = A(ia:ia+n-1`, `ja:ja+n-1)` using the scaling factors in the vectors sr and sc. The scaling factors are computed by p?poequ.

## Input Parameters

uplo

  (global) CHARACTER. Specifies the upper or lower triangular part of the symmetric distributed matrix `sub(A)` is to be referenced:

  = 'U': Upper triangular part;

  = 'L': Lower triangular part.

n

  (global) INTEGER.

  The order of the distributed submatrix sub(A). `n ≥ 0`.

a

  (local).

  REAL for pslaqsy

  DOUBLE PRECISION for pdlaqsy

  COMPLEX for pclaqsy

  COMPLEX*16 for pzlaqsy.

  Pointer into the local memory to an array of DIMENSION (lld_a, LOCc(ja+n-1)).

  On entry, this array contains the local pieces of the distributed matrix sub(A). On entry, the local pieces of the distributed symmetric matrix sub(A).

  If `uplo = 'U'`, the leading n-by-n upper triangular part of sub(A) contains the upper triangular part of the 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 part of the matrix, and the strictly upper triangular part of sub(A) is not referenced.

ia, ja

  (global) INTEGER.

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

desca

  (global and local) INTEGER array, DIMENSION (dlen_). The array descriptor for the distributed matrix A.

sr

  (local)

  REAL for pslaqsy

  DOUBLE PRECISION for pdlaqsy

  COMPLEX for pclaqsy

  COMPLEX*16 for pzlaqsy.

  Array, DIMENSION LOCr(m_a). The scale factors for `A(ia:ia+m-1`, `ja:ja+n-1)`. sr is aligned with the distributed matrix A, and replicated across every process column. sr is tied to the distributed matrix A.

sc

  (local)

  REAL for pslaqsy

  DOUBLE PRECISION for pdlaqsy

  COMPLEX for pclaqsy

  COMPLEX*16 for pzlaqsy.

  Array, DIMENSION LOCc(m_a). The scale factors for A (ia:ia+m-1, `ja:ja+n-1)`. sr is aligned with the distributed matrix A, and replicated across every process column. sr is tied to the distributed matrix A.

scond

  (global). REAL for pslaqsy

  DOUBLE PRECISION for pdlaqsy

  COMPLEX for pclaqsy

  COMPLEX*16 for pzlaqsy.

  Ratio of the smallest sr(i) (respectively sc(j)) to the largest sr(i) (respectively sc(j)), with `ia ≤ i ≤ ia+n-1` and `ja ≤ j ≤ ja+n-1`.

amax

  (global).

  REAL for pslaqsy

  DOUBLE PRECISION for pdlaqsy

  COMPLEX for pclaqsy

  COMPLEX*16 for pzlaqsy.

  Absolute value of largest distributed submatrix entry.

## Output Parameters

a

  On exit,

  if `equed = 'Y'`, the equilibrated matrix:

  `diag(sr(ia:ia+n-1)) * sub(A) * diag(sc(ja:ja+n-1))`.

equed

  (global) CHARACTER*1.

  Specifies whether or not equilibration was done.

  = 'N': No equilibration.

  = 'Y': Equilibration was done, that is, sub(A) has been replaced by:

  `diag(sr(ia:ia+n-1))* sub(A) * diag(sc(ja:ja+n-1))`.

Parent topic: Auxiliary Routines