Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/31/2023
Public

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

Document Table of Contents

?pptrf

Computes the Cholesky factorization of a symmetric (Hermitian) positive-definite matrix using packed storage.

Syntax

lapack_int LAPACKE_spptrf (int matrix_layout , char uplo , lapack_int n , float * ap );

lapack_int LAPACKE_dpptrf (int matrix_layout , char uplo , lapack_int n , double * ap );

lapack_int LAPACKE_cpptrf (int matrix_layout , char uplo , lapack_int n , lapack_complex_float * ap );

lapack_int LAPACKE_zpptrf (int matrix_layout , char uplo , lapack_int n , lapack_complex_double * ap );

Include Files
  • mkl.h
Description

The routine forms the Cholesky factorization of a symmetric positive-definite or, for complex data, Hermitian positive-definite packed matrix A:

A = UT*U for real data, A = UH*U for complex data if uplo='U'
A = L*LT for real data, A = L*LH for complex data if uplo='L'

where L is a lower triangular matrix and U is upper triangular.

NOTE:

This routine supports the Progress Routine feature. See Progress Function for details.

Input Parameters

matrix_layout

Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).

uplo

Must be 'U' or 'L'.

Indicates whether the upper or lower triangular part of A is packed in the array ap, and how A is factored:

If uplo = 'U', the array ap stores the upper triangular part of the matrix A, and A is factored as UH*U.

If uplo = 'L', the array ap stores the lower triangular part of the matrix A; A is factored as L*LH.

n

The order of matrix A; n 0.

ap

Array, size at least max(1, n(n+1)/2). The array ap contains either the upper or the lower triangular part of the matrix A (as specified by uplo) in packed storage (see Matrix Storage Schemes).

Output Parameters

ap

Overwritten by the Cholesky factor U or L, as specified by uplo.

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 factorization could not be completed. This may indicate an error in forming the matrix A.

Application Notes

If uplo = 'U', the computed factor U is the exact factor of a perturbed matrix A + E, where


Equation

c(n) is a modest linear function of n, and ε is the machine precision.

A similar estimate holds for uplo = 'L'.

The total number of floating-point operations is approximately (1/3)n3 for real flavors and (4/3)n3 for complex flavors.

After calling this routine, you can call the following routines:

?pptrs

to solve A*X = B

?ppcon

to estimate the condition number of A

?pptri

to compute the inverse of A.