Skip to content
fn

lapack_lu_f32

void lapack_lu_f32(const float * A, int n, int * ipiv, float * L_out, float * U_out, int * info)

Single-precision LU decomposition split into separate L and U matrices.

Runs sgetrf_ and then explicitly extracts the unit-lower-triangular LL and upper-triangular UU from the packed LAPACK output.

Math

PA=LUP A = L U where PP is encoded by ipiv.

References

LAPACK sgetrf_.

Parameters

Aconst float*
Row-major n×nn \times n input.
nint
Side length.
ipivint*
Pivot indices written by sgetrf_ (1-based, length nn).
L_outfloat*
Receives the unit-lower-triangular factor (row-major, n×nn \times n).
U_outfloat*
Receives the upper-triangular factor (row-major, n×nn \times n).
infoint*
LAPACK status word.