posv#

Functions

void sposv(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict B,
    const INT            ldb,
          INT*           info
);
void sposv(const char *uplo, const INT n, const INT nrhs, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, INT *info)#

SPOSV computes the solution to a real system of linear equations.

A * X = B

where A is an n-by-n symmetric positive definite matrix and X and B are n-by-nrhs matrices.

The Cholesky decomposition is used to factor A as

A = U**T * U, if uplo = 'U', or
A = L * L**T, if uplo = 'L',

where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The number of linear equations. n>=0.

in
nrhs

The number of right hand sides. nrhs>=0.

inout
A

Array of dimension (lda, n). On entry, the symmetric matrix A. If uplo='U', the leading n-by-n upper triangular part of 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 A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, if info=0, the factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T.

in
lda

The leading dimension of the array A. lda>=max(1,n).

inout
B

Array of dimension (ldb, nrhs). On entry, the n-by-nrhs right hand side matrix B. On exit, if info=0, the n-by-nrhs solution matrix X.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
info

  • info=0: successful exit

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

  • info>0: if info=k, the leading principal minor of order k of A is not positive, so the factorization could not be completed, and the solution has not been computed.

Functions

void dposv(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict B,
    const INT            ldb,
          INT*           info
);
void dposv(const char *uplo, const INT n, const INT nrhs, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, INT *info)#

DPOSV computes the solution to a real system of linear equations.

A * X = B

where A is an n-by-n symmetric positive definite matrix and X and B are n-by-nrhs matrices.

The Cholesky decomposition is used to factor A as

A = U**T * U, if uplo = 'U', or
A = L * L**T, if uplo = 'L',

where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The number of linear equations. n>=0.

in
nrhs

The number of right hand sides. nrhs>=0.

inout
A

Array of dimension (lda, n). On entry, the symmetric matrix A. If uplo='U', the leading n-by-n upper triangular part of 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 A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, if info=0, the factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T.

in
lda

The leading dimension of the array A. lda>=max(1,n).

inout
B

Array of dimension (ldb, nrhs). On entry, the n-by-nrhs right hand side matrix B. On exit, if info=0, the n-by-nrhs solution matrix X.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
info

  • info=0: successful exit

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

  • info>0: if info=k, the leading principal minor of order k of A is not positive, so the factorization could not be completed, and the solution has not been computed.

Functions

void cposv(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
          c64*  restrict A,
    const INT            lda,
          c64*  restrict B,
    const INT            ldb,
          INT*           info
);
void cposv(const char *uplo, const INT n, const INT nrhs, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, INT *info)#

CPOSV computes the solution to a complex system of linear equations.

A * X = B

where A is an n-by-n Hermitian positive definite matrix and X and B are n-by-nrhs matrices.

The Cholesky decomposition is used to factor A as

A = U**H * U, if uplo = 'U', or
A = L * L**H, if uplo = 'L',

where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The number of linear equations. n>=0.

in
nrhs

The number of right hand sides. nrhs>=0.

inout
A

Array of dimension (lda, n). On entry, the Hermitian matrix A. If uplo='U', the leading n-by-n upper triangular part of 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 A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, if info=0, the factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H.

in
lda

The leading dimension of the array A. lda>=max(1,n).

inout
B

Array of dimension (ldb, nrhs). On entry, the n-by-nrhs right hand side matrix B. On exit, if info=0, the n-by-nrhs solution matrix X.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
info

  • info=0: successful exit

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

  • info>0: if info=k, the leading principal minor of order k of A is not positive, so the factorization could not be completed, and the solution has not been computed.

Functions

void zposv(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
          c128* restrict A,
    const INT            lda,
          c128* restrict B,
    const INT            ldb,
          INT*           info
);
void zposv(const char *uplo, const INT n, const INT nrhs, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, INT *info)#

ZPOSV computes the solution to a complex system of linear equations.

A * X = B

where A is an n-by-n Hermitian positive definite matrix and X and B are n-by-nrhs matrices.

The Cholesky decomposition is used to factor A as

A = U**H * U, if uplo = 'U', or
A = L * L**H, if uplo = 'L',

where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The number of linear equations. n>=0.

in
nrhs

The number of right hand sides. nrhs>=0.

inout
A

Array of dimension (lda, n). On entry, the Hermitian matrix A. If uplo='U', the leading n-by-n upper triangular part of 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 A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, if info=0, the factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H.

in
lda

The leading dimension of the array A. lda>=max(1,n).

inout
B

Array of dimension (ldb, nrhs). On entry, the n-by-nrhs right hand side matrix B. On exit, if info=0, the n-by-nrhs solution matrix X.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
info

  • info=0: successful exit

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

  • info>0: if info=k, the leading principal minor of order k of A is not positive, so the factorization could not be completed, and the solution has not been computed.