geqp3#

Functions

void sgeqp3(
    const INT           m,
    const INT           n,
          f32* restrict A,
    const INT           lda,
          INT* restrict jpvt,
          f32* restrict tau,
          f32* restrict work,
    const INT           lwork,
          INT*          info
);
void sgeqp3(const INT m, const INT n, f32 *restrict A, const INT lda, INT *restrict jpvt, f32 *restrict tau, f32 *restrict work, const INT lwork, INT *info)#

SGEQP3 computes a QR factorization with column pivoting of a matrix A: A*P = Q*R using Level 3 BLAS.

The matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) … H(k), where k = min(m,n).

Each H(i) has the form

H(i) = I - tau * v * v**T

where tau is a real scalar, and v is a real vector with v(0:i-2) = 0 and v(i-1) = 1; v(i:m-1) is stored on exit in A(i:m-1, i-1), and tau in TAU(i-1).

Parameters

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

inout
A

Double precision array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R; the elements below the diagonal, together with the array TAU, represent the orthogonal matrix Q as a product of min(M,N) elementary reflectors.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
jpvt

Integer array, dimension (n). On entry, if jpvt[j] != 0, the j-th column of A is permuted to the front of A*P (a leading column); if jpvt[j] = 0, the j-th column of A is a free column. On exit, if jpvt[j] = k, then the j-th column of A*P was the k-th column of A (0-based).

out
tau

Double precision array, dimension (min(m,n)). The scalar factors of the elementary reflectors.

out
work

Double precision array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= 3*n+1. For optimal performance lwork >= 2*n + (n+1)*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.

out
info

  • = 0: successful exit.

  • < 0: if info = -i, the i-th argument had an illegal value.

Functions

void dgeqp3(
    const INT           m,
    const INT           n,
          f64* restrict A,
    const INT           lda,
          INT* restrict jpvt,
          f64* restrict tau,
          f64* restrict work,
    const INT           lwork,
          INT*          info
);
void dgeqp3(const INT m, const INT n, f64 *restrict A, const INT lda, INT *restrict jpvt, f64 *restrict tau, f64 *restrict work, const INT lwork, INT *info)#

DGEQP3 computes a QR factorization with column pivoting of a matrix A: A*P = Q*R using Level 3 BLAS.

The matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) … H(k), where k = min(m,n).

Each H(i) has the form

H(i) = I - tau * v * v**T

where tau is a real scalar, and v is a real vector with v(0:i-2) = 0 and v(i-1) = 1; v(i:m-1) is stored on exit in A(i:m-1, i-1), and tau in TAU(i-1).

Parameters

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

inout
A

Double precision array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R; the elements below the diagonal, together with the array TAU, represent the orthogonal matrix Q as a product of min(M,N) elementary reflectors.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
jpvt

Integer array, dimension (n). On entry, if jpvt[j] != 0, the j-th column of A is permuted to the front of A*P (a leading column); if jpvt[j] = 0, the j-th column of A is a free column. On exit, if jpvt[j] = k, then the j-th column of A*P was the k-th column of A (0-based).

out
tau

Double precision array, dimension (min(m,n)). The scalar factors of the elementary reflectors.

out
work

Double precision array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= 3*n+1. For optimal performance lwork >= 2*n + (n+1)*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.

out
info

  • = 0: successful exit.

  • < 0: if info = -i, the i-th argument had an illegal value.

Functions

void cgeqp3(
    const INT           m,
    const INT           n,
          c64* restrict A,
    const INT           lda,
          INT* restrict jpvt,
          c64* restrict tau,
          c64* restrict work,
    const INT           lwork,
          f32* restrict rwork,
          INT*          info
);
void cgeqp3(const INT m, const INT n, c64 *restrict A, const INT lda, INT *restrict jpvt, c64 *restrict tau, c64 *restrict work, const INT lwork, f32 *restrict rwork, INT *info)#

CGEQP3 computes a QR factorization with column pivoting of a matrix A: A*P = Q*R using Level 3 BLAS.

The matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) … H(k), where k = min(m,n).

Each H(i) has the form

H(i) = I - tau * v * v**H

where tau is a complex scalar, and v is a real/complex vector with v(0:i-2) = 0 and v(i-1) = 1; v(i:m-1) is stored on exit in A(i:m-1, i-1), and tau in TAU(i-1).

Parameters

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

inout
A

Single complex array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R; the elements below the diagonal, together with the array TAU, represent the unitary matrix Q as a product of min(M,N) elementary reflectors.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
jpvt

Integer array, dimension (n). On entry, if jpvt[j] != 0, the j-th column of A is permuted to the front of A*P (a leading column); if jpvt[j] = 0, the j-th column of A is a free column. On exit, if jpvt[j] = k, then the j-th column of A*P was the k-th column of A (0-based).

out
tau

Single complex array, dimension (min(m,n)). The scalar factors of the elementary reflectors.

out
work

Single complex array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= n+1. For optimal performance lwork >= (n+1)*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.

out
rwork

Single precision array, dimension (2*n).

out
info

  • = 0: successful exit.

  • < 0: if info = -i, the i-th argument had an illegal value.

Functions

void zgeqp3(
    const INT            m,
    const INT            n,
          c128* restrict A,
    const INT            lda,
          INT*  restrict jpvt,
          c128* restrict tau,
          c128* restrict work,
    const INT            lwork,
          f64*  restrict rwork,
          INT*           info
);
void zgeqp3(const INT m, const INT n, c128 *restrict A, const INT lda, INT *restrict jpvt, c128 *restrict tau, c128 *restrict work, const INT lwork, f64 *restrict rwork, INT *info)#

ZGEQP3 computes a QR factorization with column pivoting of a matrix A: A*P = Q*R using Level 3 BLAS.

The matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) … H(k), where k = min(m,n).

Each H(i) has the form

H(i) = I - tau * v * v**H

where tau is a complex scalar, and v is a real/complex vector with v(0:i-2) = 0 and v(i-1) = 1; v(i:m-1) is stored on exit in A(i:m-1, i-1), and tau in TAU(i-1).

Parameters

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

inout
A

Double complex array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R; the elements below the diagonal, together with the array TAU, represent the unitary matrix Q as a product of min(M,N) elementary reflectors.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
jpvt

Integer array, dimension (n). On entry, if jpvt[j] != 0, the j-th column of A is permuted to the front of A*P (a leading column); if jpvt[j] = 0, the j-th column of A is a free column. On exit, if jpvt[j] = k, then the j-th column of A*P was the k-th column of A (0-based).

out
tau

Double complex array, dimension (min(m,n)). The scalar factors of the elementary reflectors.

out
work

Double complex array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= n+1. For optimal performance lwork >= (n+1)*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.

out
rwork

Double precision array, dimension (2*n).

out
info

  • = 0: successful exit.

  • < 0: if info = -i, the i-th argument had an illegal value.