Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?geqr

Computes a QR factorization of a general matrix, with best performance for tall and skinny matrices.

call sgeqr(m, n, a, lda, t, tsize, work, lwork, info)

call dgeqr(m, n, a, lda, t, tsize, work, lwork, info)

call cgeqr(m, n, a, lda, t, tsize, work, lwork, info)

call zgeqr(m, n, a, lda, t, tsize, work, lwork, info)

Description

The ?geqr routine computes a QR factorization of an m-by-n matrix A. If the matrix is tall and skinny (m is substantially larger than m), a highly scalable algorithm is used to avoid communication overhead.

NOTE:

The internal format of the elementary reflectors generated by ?geqr is only compatible with the ?gemqr routine and not any other QR routines.

Input Parameters
m

INTEGER. The number of rows of the matrix A. m 0.

n

REAL for sgeqr

INTEGER. The number of columns of the matrix A. n 0.

a

DOUBLE PRECISION for dgeqr

COMPLEX for cgeqr

COMPLEX*16 for zgeqr

Array of size (lda,n). On entry, the m-by-n matrix A.

lda

INTEGER. The leading dimension of the array a. lda max(1,m).

tsize

INTEGER. If tsize 5, the size of the array t. If tsize = -1 or tsize = -2, then the routine performs a workspace query. The routine calculates the sizes required for the t and work arrays and returns these values as the first entries of the t and work arrays, without issuing any error message related to t or work by xerbla.

If tsize = -1, the routine calculates the optimal size of t for optimum performance and returns this value in t(1).

If tsize = -2, the routine calculates then minimum size required for t and returns this value in t(1).

lwork

INTEGER. The size of the array work. If lwork = -1 or lwork = -2, then the routine performs a workspace query. The routine only calculates the sizes of the t and work arrays and returns these values as the first entries of the t and work arrays, without issuing any error message related to t or work by xerbla.

If lwork = -1, the routine calculates the optimal size of work for optimum performance and returns this value in work(1).

If lwork = -2, the routine calculates the minimum size required for work and returns this value in work(1).

Output Parameters
a

REAL for sgeqr

DOUBLE PRECISION for dgeqr

COMPLEX for cgeqr

COMPLEX*16 for zgeqr

On exit, the elements on and above the diagonal of the array contain the (min(m,n))-by-n upper trapezoidal matrix R (R is upper triangular if mn); the elements below the diagonal represent Q.

t

REAL for sgelq

DOUBLE PRECISION for dgelq

COMPLEX for cgelq

COMPLEX*16 for zgelq

Array, size (max(5,tsize)).

If info = 0, t(1) returns the optimal value for tsize. You can specify that it return the minimum required value for tsize instead - see the tsize description for details. The remaining entries of t contains part of the data structure used to represent Q. To apply or construct Q, you need to retain a and t and pass them to other routines.

work

REAL for sgelq

DOUBLE PRECISION for dgelq

COMPLEX for cgelq

COMPLEX*16 for zgelq

Array, size (max(1,lwork)).

If info = 0, work(1) contains the optimal value for lwork. You can specify that it return the minimum required value for lwork instead - see the lwork description for details.

info

INTEGER.

info = 0 indicates a successful exit.

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

See Also