Skip to content
fn

lapack_solve_f32

void lapack_solve_f32(float * A, float * B, int n, int nrhs, int * info)

Single-precision linear system solver AX=BA X = B.

Computes the LU factorization of AA (with partial pivoting) and solves for XX in place of BB. Used for square invertible systems.

Math

AX=B    ⟹    X=A−1BA X = B \;\;\Longrightarrow\;\; X = A^{-1} B

References

LAPACK sgesv_.

Parameters

Afloat*
Row-major n×nn \times n coefficient matrix; overwritten by its LU.
Bfloat*
Row-major n×nrhsn \times \text{nrhs} right-hand-side; overwritten by XX.
nint
Order of AA.
nrhsint
Number of right-hand-side columns.
infoint*
LAPACK status (> 0 means AA is singular at pivot info).