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

On entry, the symmetric matrix A. On exit, if info = 0, the factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T. Array of dimension (lda, n).

in
lda

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

inout
B

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

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 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

On entry, the symmetric matrix A. On exit, if info = 0, the factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T. Array of dimension (lda, n).

in
lda

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

inout
B

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

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 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

On entry, the Hermitian matrix A. On exit, if info = 0, the factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H. Array of dimension (lda, n).

in
lda

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

inout
B

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

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 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

On entry, the Hermitian matrix A. On exit, if info = 0, the factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H. Array of dimension (lda, n).

in
lda

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

inout
B

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

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 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.