Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
Public

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

Document Table of Contents

?gelq

Computes an LQ factorization of a general matrix.

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

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

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

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

Description

The ?gelq routines computes an LQ factorization of an m-by-n matrix A. If the matrix is short and wide (n 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 ?gelq is only compatible with the ?gemlq routine and not any other LQ routines.

NOTE:

An optimized version of ?gelq is not available.

Input Parameters

m

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

n

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

a

REAL for sgelq

DOUBLE PRECISION for dgelq

COMPLEX for cgelq

COMPLEX*16 for zgelq

Array, size (lda, n). Contains the m-by-n matrix A.

lda

INTEGER. The leading dimension of the array a. ldamax(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 sgelq

DOUBLE PRECISION for dgelq

COMPLEX for cgelq

COMPLEX*16 for zgelq

The elements on and below the diagonal of the array contain the lower trapezoidal matrix L (L is lower triangular if mn). The elements above the diagonal are used to store part of the internal data structure representing 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