geqp3rk#

Functions

void sgeqp3rk(
    const INT           m,
    const INT           n,
    const INT           nrhs,
    const INT           kmax,
          f32           abstol,
          f32           reltol,
          f32* restrict A,
    const INT           lda,
          INT*          K,
          f32*          maxc2nrmk,
          f32*          relmaxc2nrmk,
          INT* restrict jpiv,
          f32* restrict tau,
          f32* restrict work,
    const INT           lwork,
          INT* restrict iwork,
          INT*          info
);
void sgeqp3rk(const INT m, const INT n, const INT nrhs, const INT kmax, f32 abstol, f32 reltol, f32 *restrict A, const INT lda, INT *K, f32 *maxc2nrmk, f32 *relmaxc2nrmk, INT *restrict jpiv, f32 *restrict tau, f32 *restrict work, const INT lwork, INT *restrict iwork, INT *info)#

SGEQP3RK computes a truncated (rank K) or full rank Householder QR factorization with column pivoting of a real M-by-N matrix A using Level 3 BLAS.

K is the number of columns that were factorized.

A * P(K) = Q(K) * R(K)

At the same time, the routine overwrites a real M-by-NRHS matrix B with Q(K)**T * B using Level 3 BLAS.

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.

in
nrhs

The number of right hand sides. nrhs >= 0.

in
kmax

The maximum number of columns to factorize. kmax >= 0.

in
abstol

The absolute tolerance for maximum column 2-norm.

in
reltol

The relative tolerance for maximum column 2-norm.

inout
A

Double precision array, dimension (lda, n+nrhs). On entry, the M-by-N matrix A and M-by-NRHS matrix B. On exit, the factors of A and Q(K)**T * B.

in
lda

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

out
K

The factorization rank.

out
maxc2nrmk

The maximum column 2-norm of the residual matrix.

out
relmaxc2nrmk

The ratio maxc2nrmk / maxc2nrm.

out
jpiv

Integer array, dimension (n). Column pivot indices.

out
tau

Double precision array, dimension (min(m, n)).

out
work

Double precision workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= 1 if min(m,n) = 0, otherwise lwork >= 3*n+nrhs-1. If lwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (n-1).

out
info

  • = 0: successful exit

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

  • = j (1 <= j <= n): NaN detected in column j

  • = j (n+1 <= j <= 2*n): Inf detected in column j-n

Functions

void dgeqp3rk(
    const INT           m,
    const INT           n,
    const INT           nrhs,
    const INT           kmax,
          f64           abstol,
          f64           reltol,
          f64* restrict A,
    const INT           lda,
          INT*          K,
          f64*          maxc2nrmk,
          f64*          relmaxc2nrmk,
          INT* restrict jpiv,
          f64* restrict tau,
          f64* restrict work,
    const INT           lwork,
          INT* restrict iwork,
          INT*          info
);
void dgeqp3rk(const INT m, const INT n, const INT nrhs, const INT kmax, f64 abstol, f64 reltol, f64 *restrict A, const INT lda, INT *K, f64 *maxc2nrmk, f64 *relmaxc2nrmk, INT *restrict jpiv, f64 *restrict tau, f64 *restrict work, const INT lwork, INT *restrict iwork, INT *info)#

DGEQP3RK computes a truncated (rank K) or full rank Householder QR factorization with column pivoting of a real M-by-N matrix A using Level 3 BLAS.

K is the number of columns that were factorized.

A * P(K) = Q(K) * R(K)

At the same time, the routine overwrites a real M-by-NRHS matrix B with Q(K)**T * B using Level 3 BLAS.

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.

in
nrhs

The number of right hand sides. nrhs >= 0.

in
kmax

The maximum number of columns to factorize. kmax >= 0.

in
abstol

The absolute tolerance for maximum column 2-norm.

in
reltol

The relative tolerance for maximum column 2-norm.

inout
A

Double precision array, dimension (lda, n+nrhs). On entry, the M-by-N matrix A and M-by-NRHS matrix B. On exit, the factors of A and Q(K)**T * B.

in
lda

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

out
K

The factorization rank.

out
maxc2nrmk

The maximum column 2-norm of the residual matrix.

out
relmaxc2nrmk

The ratio maxc2nrmk / maxc2nrm.

out
jpiv

Integer array, dimension (n). Column pivot indices.

out
tau

Double precision array, dimension (min(m, n)).

out
work

Double precision workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= 1 if min(m,n) = 0, otherwise lwork >= 3*n+nrhs-1. If lwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (n-1).

out
info

  • = 0: successful exit

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

  • = j (1 <= j <= n): NaN detected in column j

  • = j (n+1 <= j <= 2*n): Inf detected in column j-n

Functions

void cgeqp3rk(
    const INT           m,
    const INT           n,
    const INT           nrhs,
    const INT           kmax,
          f32           abstol,
          f32           reltol,
          c64* restrict A,
    const INT           lda,
          INT*          K,
          f32*          maxc2nrmk,
          f32*          relmaxc2nrmk,
          INT* restrict jpiv,
          c64* restrict tau,
          c64* restrict work,
    const INT           lwork,
          f32* restrict rwork,
          INT* restrict iwork,
          INT*          info
);
void cgeqp3rk(const INT m, const INT n, const INT nrhs, const INT kmax, f32 abstol, f32 reltol, c64 *restrict A, const INT lda, INT *K, f32 *maxc2nrmk, f32 *relmaxc2nrmk, INT *restrict jpiv, c64 *restrict tau, c64 *restrict work, const INT lwork, f32 *restrict rwork, INT *restrict iwork, INT *info)#

CGEQP3RK computes a truncated (rank K) or full rank Householder QR factorization with column pivoting of a complex M-by-N matrix A using Level 3 BLAS.

K is the number of columns that were factorized.

A * P(K) = Q(K) * R(K)

At the same time, the routine overwrites a complex M-by-NRHS matrix B with Q(K)**H * B using Level 3 BLAS.

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.

in
nrhs

The number of right hand sides. nrhs >= 0.

in
kmax

The maximum number of columns to factorize. kmax >= 0.

in
abstol

The absolute tolerance for maximum column 2-norm.

in
reltol

The relative tolerance for maximum column 2-norm.

inout
A

Complex*16 array, dimension (lda, n+nrhs). On entry, the M-by-N matrix A and M-by-NRHS matrix B. On exit, the factors of A and Q(K)**H * B.

in
lda

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

out
K

The factorization rank.

out
maxc2nrmk

The maximum column 2-norm of the residual matrix.

out
relmaxc2nrmk

The ratio maxc2nrmk / maxc2nrm.

out
jpiv

Integer array, dimension (n). Column pivot indices.

out
tau

Complex*16 array, dimension (min(m, n)).

out
work

Complex*16 workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= 1 if min(m,n) = 0, otherwise lwork >= n+nrhs-1. If lwork = -1, then a workspace query is assumed.

out
rwork

Single precision array, dimension (2*n). Used to store partial and exact column 2-norms.

out
iwork

Integer array, dimension (n-1).

out
info

  • = 0: successful exit

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

  • = j (1 <= j <= n): NaN detected in column j

  • = j (n+1 <= j <= 2*n): Inf detected in column j-n

Functions

void zgeqp3rk(
    const INT            m,
    const INT            n,
    const INT            nrhs,
    const INT            kmax,
          f64            abstol,
          f64            reltol,
          c128* restrict A,
    const INT            lda,
          INT*           K,
          f64*           maxc2nrmk,
          f64*           relmaxc2nrmk,
          INT*  restrict jpiv,
          c128* restrict tau,
          c128* restrict work,
    const INT            lwork,
          f64*  restrict rwork,
          INT*  restrict iwork,
          INT*           info
);
void zgeqp3rk(const INT m, const INT n, const INT nrhs, const INT kmax, f64 abstol, f64 reltol, c128 *restrict A, const INT lda, INT *K, f64 *maxc2nrmk, f64 *relmaxc2nrmk, INT *restrict jpiv, c128 *restrict tau, c128 *restrict work, const INT lwork, f64 *restrict rwork, INT *restrict iwork, INT *info)#

ZGEQP3RK computes a truncated (rank K) or full rank Householder QR factorization with column pivoting of a complex M-by-N matrix A using Level 3 BLAS.

K is the number of columns that were factorized.

A * P(K) = Q(K) * R(K)

At the same time, the routine overwrites a complex M-by-NRHS matrix B with Q(K)**H * B using Level 3 BLAS.

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.

in
nrhs

The number of right hand sides. nrhs >= 0.

in
kmax

The maximum number of columns to factorize. kmax >= 0.

in
abstol

The absolute tolerance for maximum column 2-norm.

in
reltol

The relative tolerance for maximum column 2-norm.

inout
A

Complex*16 array, dimension (lda, n+nrhs). On entry, the M-by-N matrix A and M-by-NRHS matrix B. On exit, the factors of A and Q(K)**H * B.

in
lda

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

out
K

The factorization rank.

out
maxc2nrmk

The maximum column 2-norm of the residual matrix.

out
relmaxc2nrmk

The ratio maxc2nrmk / maxc2nrm.

out
jpiv

Integer array, dimension (n). Column pivot indices.

out
tau

Complex*16 array, dimension (min(m, n)).

out
work

Complex*16 workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= 1 if min(m,n) = 0, otherwise lwork >= n+nrhs-1. If lwork = -1, then a workspace query is assumed.

out
rwork

Double precision array, dimension (2*n). Used to store partial and exact column 2-norms.

out
iwork

Integer array, dimension (n-1).

out
info

  • = 0: successful exit

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

  • = j (1 <= j <= n): NaN detected in column j

  • = j (n+1 <= j <= 2*n): Inf detected in column j-n