?pstf2

Computes the Cholesky factorization with complete pivoting of a real symmetric or complex Hermitian positive semi-definite matrix.

Syntax

call spstf2( uplo, n, a, lda, piv, rank , tol , work , info )

call dpstf2( uplo, n, a, lda, piv, rank , tol , work , info )

call cpstf2( uplo, n, a, lda, piv, rank , tol , work , info )

call zpstf2( uplo, n, a, lda, piv, rank , tol , work , info )

Include Files

  • Fortran: mkl.fi
  • C: mkl.h

Description

The real flavors spstf2 and dpstf2 compute the Cholesky factorization with complete pivoting of a real symmetric positive semi-definite matrix A. The complex flavors cpstf2 and zpstf2 compute the Cholesky factorization with complete pivoting of a complex Hermitian positive semi-definite matrix A. The factorization has the form:

PT* A * P = UT * U, if uplo = 'U' for real flavors,

PT* A * P = UH * U, if uplo = 'U' for complex flavors,

PT* A * P = L * LT, if uplo = 'L' for real flavors,

PT* A * P = L * LH, if uplo = 'L' for complex flavors,

where U is an upper triangular matrix and L is lower triangular, and P is stored as vector piv.

This algorithm does not check that A is positive semi-definite. This version of the algorithm calls level 2 BLAS.

Input Parameters

uplo

CHARACTER*1.

Specifies whether the upper or lower triangular part of the symmetric or Hermitian matrix A is stored:

= 'U': Upper triangular,

= 'L': Lower triangular.

n

INTEGER. The order of the matrix A. n 0.

a

REAL for spstf2,

DOUBLE PRECISION for dpstf2,

COMPLEX for cpstf2,

DOUBLE COMPLEX for zpstf2.

Array, DIMENSION (lda, *).

On entry, the symmetric matrix A. If uplo = 'U', the leading n-by-n upper triangular part of the array a contains the upper triangular part of the matrix A, and the strictly lower triangular part of a is not referenced. If uplo = 'L', the leading n-by-n lower triangular part of the array a contains the lower triangular part of the matrix A, and the strictly upper triangular part of a is not referenced.

tol

REAL for spstf2 and cpstf2,

DOUBLE PRECISION for dpstf2 and zpstf2.

A user-defined tolerance.

If tol < 0, n*ulp*max(A(k,k)) will be used (ulp is the Unit in the Last Place, or Unit of Least Precision). The algorithm terminates at the (k - 1)-st step if the pivot is not greater than tol.

lda

INTEGER. The leading dimension of the matrix A. lda max(1,n).

work

REAL for spstf2 and cpstf2,

DOUBLE PRECISION for dpstf2 and zpstf2.

Workspace array, DIMENSION at least max (1, 2*n).

Output Parameters

piv

INTEGER. Array. DIMENSION at least max (1,n).

piv is such that the non-zero entries are P ( piv (k), k ) = 1.

a

On exit, if info = 0, the factor U or L from the Cholesky factorization stored the same way as the matrix A is stored on entry.

rank

INTEGER.

The rank of A, determined by the number of steps the algorithm completed.

info

INTEGER.

< 0: if info = -k, the k-th parameter had an illegal value,

=0: the algorithm completed successfully,

> 0: the matrix A is rank-deficient with the computed rank, returned in rank, or indefinite.

For more complete information about compiler optimizations, see our Optimization Notice.