Skip to content
fn

lapack_qr_f32

void lapack_qr_f32(const float * A, int m, int n, float * Q, float * R, int * info)

Single-precision reduced (thin) QR decomposition.

Computes A=QRA = Q R where QQ is m×km \times k with orthonormal columns and RR is k×nk \times n upper-triangular, k=min⁡(m,n)k = \min(m, n). Internally calls sgeqrf_ to produce Householder reflectors then sorgqr_ to materialise QQ.

Math

A=QR,    QTQ=IkA = Q R, \;\; Q^T Q = I_k

References

LAPACK sgeqrf_ + sorgqr_.

Parameters

Aconst float*
Row-major m×nm \times n input.
m, nint
Matrix dimensions.
Qfloat*
Output orthonormal-columns matrix, shape m×km \times k (row-major).
Rfloat*
Output upper-triangular matrix, shape k×nk \times n (row-major).
infoint*
LAPACK status word.