Skip to content
fn

lapack_inv_f32

void lapack_inv_f32(float * A, int n, int * info)

Single-precision in-place matrix inversion via LU.

Overwrites AA with A−1A^{-1}. Internally runs sgetrf_ (LU with partial pivoting) followed by sgetri_ (invert using the LU factors).

Math

AA−1=InA A^{-1} = I_n

References

LAPACK sgetrf_ + sgetri_.

Parameters

Afloat*
Row-major n×nn \times n matrix; replaced in place with A−1A^{-1}.
nint
Side length.
infoint*
LAPACK status word. 0 = success; < 0 = illegal argument; > 0 = matrix is exactly singular (no inverse).