Cholesky and LDLT decompositions

riscv_status riscv_mat_cholesky_f16(const riscv_matrix_instance_f16 *pSrc, riscv_matrix_instance_f16 *pDst)
riscv_status riscv_mat_cholesky_f32(const riscv_matrix_instance_f32 *pSrc, riscv_matrix_instance_f32 *pDst)
riscv_status riscv_mat_cholesky_f64(const riscv_matrix_instance_f64 *pSrc, riscv_matrix_instance_f64 *pDst)
riscv_status riscv_mat_ldlt_f32(const riscv_matrix_instance_f32 *pSrc, riscv_matrix_instance_f32 *pl, riscv_matrix_instance_f32 *pd, uint16_t *pp)
riscv_status riscv_mat_ldlt_f64(const riscv_matrix_instance_f64 *pSrc, riscv_matrix_instance_f64 *pl, riscv_matrix_instance_f64 *pd, uint16_t *pp)
group MatrixChol

Computes the Cholesky or LL^t decomposition of a matrix.

If the input matrix does not have a decomposition, then the algorithm terminates and returns error status RISCV_MATH_DECOMPOSITION_FAILURE.

Functions

riscv_status riscv_mat_cholesky_f16(const riscv_matrix_instance_f16 *pSrc, riscv_matrix_instance_f16 *pDst)

Floating-point Cholesky decomposition of positive-definite matrix.

Floating-point Cholesky decomposition of Symmetric Positive Definite Matrix.

If the matrix is ill conditioned or only semi-definite, then it is better using the LDL^t decomposition. The decomposition of A is returning a lower triangular matrix U such that A = L L^t

Parameters
  • pSrc[in] points to the instance of the input floating-point matrix structure.

  • pDst[out] points to the instance of the output floating-point matrix structure.

Returns

The function returns RISCV_MATH_SIZE_MISMATCH, if the dimensions do not match.

Returns

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_SIZE_MISMATCH : Matrix size check failed

  • RISCV_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed

riscv_status riscv_mat_cholesky_f32(const riscv_matrix_instance_f32 *pSrc, riscv_matrix_instance_f32 *pDst)

Floating-point Cholesky decomposition of positive-definite matrix.

Floating-point Cholesky decomposition of Symmetric Positive Definite Matrix.

If the matrix is ill conditioned or only semi-definite, then it is better using the LDL^t decomposition. The decomposition of A is returning a lower triangular matrix L such that A = L L^t

Parameters
  • pSrc[in] points to the instance of the input floating-point matrix structure.

  • pDst[out] points to the instance of the output floating-point matrix structure.

Returns

The function returns RISCV_MATH_SIZE_MISMATCH, if the dimensions do not match.

Returns

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_SIZE_MISMATCH : Matrix size check failed

  • RISCV_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed

riscv_status riscv_mat_cholesky_f64(const riscv_matrix_instance_f64 *pSrc, riscv_matrix_instance_f64 *pDst)

Floating-point Cholesky decomposition of positive-definite matrix.

Floating-point Cholesky decomposition of Symmetric Positive Definite Matrix.

If the matrix is ill conditioned or only semi-definite, then it is better using the LDL^t decomposition. The decomposition of A is returning a lower triangular matrix L such that A = L L^t

Parameters
  • pSrc[in] points to the instance of the input floating-point matrix structure.

  • pDst[out] points to the instance of the output floating-point matrix structure.

Returns

The function returns RISCV_MATH_SIZE_MISMATCH, if the dimensions do not match.

Returns

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_SIZE_MISMATCH : Matrix size check failed

  • RISCV_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed

riscv_status riscv_mat_ldlt_f32(const riscv_matrix_instance_f32 *pSrc, riscv_matrix_instance_f32 *pl, riscv_matrix_instance_f32 *pd, uint16_t *pp)

Floating-point LDL^t decomposition of positive semi-definite matrix.

Floating-point LDL decomposition of Symmetric Positive Semi-Definite Matrix.

Computes the LDL^t decomposition of a matrix A such that P A P^t = L D L^t.

Parameters
  • pSrc[in] points to the instance of the input floating-point matrix structure.

  • pl[out] points to the instance of the output floating-point triangular matrix structure.

  • pd[out] points to the instance of the output floating-point diagonal matrix structure.

  • pp[out] points to the instance of the output floating-point permutation vector.

Returns

The function returns RISCV_MATH_SIZE_MISMATCH, if the dimensions do not match.

Returns

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_SIZE_MISMATCH : Matrix size check failed

  • RISCV_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed

riscv_status riscv_mat_ldlt_f64(const riscv_matrix_instance_f64 *pSrc, riscv_matrix_instance_f64 *pl, riscv_matrix_instance_f64 *pd, uint16_t *pp)

Floating-point LDL^t decomposition of positive semi-definite matrix.

Floating-point LDL decomposition of Symmetric Positive Semi-Definite Matrix.

Computes the LDL^t decomposition of a matrix A such that P A P^t = L D L^t.

Parameters
  • pSrc[in] points to the instance of the input floating-point matrix structure.

  • pl[out] points to the instance of the output floating-point triangular matrix structure.

  • pd[out] points to the instance of the output floating-point diagonal matrix structure.

  • pp[out] points to the instance of the output floating-point permutation vector.

Returns

The function returns RISCV_MATH_SIZE_MISMATCH, if the dimensions do not match.

Returns

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_SIZE_MISMATCH : Matrix size check failed

  • RISCV_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed