int vsip_lud_f(const vsip_lu_f* lud, const vsip_mview_f* A); int vsip_clud_f(const vsip_clu_f* lud, const vsip_cmview_f* A);
This function performs LU decomposition of matrix
using the pre-allocated LU decomposition object
. The decomposition
computes:

where:
is a permutation matrix
is a unit lower triangular matrix
is an upper triangular matrix
The function uses partial pivoting for numerical stability. The decomposed factors are stored within the LU decomposition object and can be used for subsequent operations like solving linear systems.
const vsip_dlu_p* lud: Pointer to the LU decomposition object created by vsip_lud_create_p .
const vsip_dmview_p* A: Pointer to the
matrix view to be decomposed.
Returns 0 on success.
Returns a non-zero value on error (e.g., if the matrix is singular or dimensions don’t match the LU object).
vsip_lu_f *lu_obj; vsip_mview_f *matrix_A; int result; // Assuming lu_obj and matrix_A have been properly initialized // with matching dimensions result = vsip_lud_f(lu_obj, matrix_A); if (result != 0) { // Handle error (e.g., singular matrix) }
The input matrix
must have full rank.
The input matrix
must have the same dimensions as specified when creating the LU decomposition object.
The contents of matrix
may be overwritten and must not be modified as long as factorization is required.
The decomposed factors
and
are stored within the LU decomposition object and can be accessed through
other VSIPL functions.