MAGMA  2.3.0 Matrix Algebra for GPU and Multicore Architectures
gelqf: LQ factorization

## Functions

magma_int_t magma_cgelqf (magma_int_t m, magma_int_t n, magmaFloatComplex *A, magma_int_t lda, magmaFloatComplex *tau, magmaFloatComplex *work, magma_int_t lwork, magma_int_t *info)
CGELQF computes an LQ factorization of a COMPLEX M-by-N matrix A: A = L * Q. More...

magma_int_t magma_cgelqf_gpu (magma_int_t m, magma_int_t n, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex *tau, magmaFloatComplex *work, magma_int_t lwork, magma_int_t *info)
CGELQF computes an LQ factorization of a COMPLEX M-by-N matrix dA: dA = L * Q. More...

magma_int_t magma_dgelqf (magma_int_t m, magma_int_t n, double *A, magma_int_t lda, double *tau, double *work, magma_int_t lwork, magma_int_t *info)
DGELQF computes an LQ factorization of a DOUBLE PRECISION M-by-N matrix A: A = L * Q. More...

magma_int_t magma_dgelqf_gpu (magma_int_t m, magma_int_t n, magmaDouble_ptr dA, magma_int_t ldda, double *tau, double *work, magma_int_t lwork, magma_int_t *info)
DGELQF computes an LQ factorization of a DOUBLE PRECISION M-by-N matrix dA: dA = L * Q. More...

magma_int_t magma_sgelqf (magma_int_t m, magma_int_t n, float *A, magma_int_t lda, float *tau, float *work, magma_int_t lwork, magma_int_t *info)
SGELQF computes an LQ factorization of a REAL M-by-N matrix A: A = L * Q. More...

magma_int_t magma_sgelqf_gpu (magma_int_t m, magma_int_t n, magmaFloat_ptr dA, magma_int_t ldda, float *tau, float *work, magma_int_t lwork, magma_int_t *info)
SGELQF computes an LQ factorization of a REAL M-by-N matrix dA: dA = L * Q. More...

magma_int_t magma_zgelqf (magma_int_t m, magma_int_t n, magmaDoubleComplex *A, magma_int_t lda, magmaDoubleComplex *tau, magmaDoubleComplex *work, magma_int_t lwork, magma_int_t *info)
ZGELQF computes an LQ factorization of a COMPLEX_16 M-by-N matrix A: A = L * Q. More...

magma_int_t magma_zgelqf_gpu (magma_int_t m, magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex *tau, magmaDoubleComplex *work, magma_int_t lwork, magma_int_t *info)
ZGELQF computes an LQ factorization of a COMPLEX_16 M-by-N matrix dA: dA = L * Q. More...

## Function Documentation

 magma_int_t magma_cgelqf ( magma_int_t m, magma_int_t n, magmaFloatComplex * A, magma_int_t lda, magmaFloatComplex * tau, magmaFloatComplex * work, magma_int_t lwork, magma_int_t * info )

CGELQF computes an LQ factorization of a COMPLEX M-by-N matrix A: A = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] A COMPLEX array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). Higher performance is achieved if A is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lda INTEGER The leading dimension of the array A. LDA >= max(1,M). [out] tau COMPLEX array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) COMPLEX array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. TODO: work is currently unused. cgeqrf2 allocates its own work of (m + n)*nb. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_cgelqf_gpu ( magma_int_t m, magma_int_t n, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex * tau, magmaFloatComplex * work, magma_int_t lwork, magma_int_t * info )

CGELQF computes an LQ factorization of a COMPLEX M-by-N matrix dA: dA = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] dA COMPLEX array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix dA. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). [in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M). [out] tau COMPLEX array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) COMPLEX array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. Higher performance is achieved if WORK is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_dgelqf ( magma_int_t m, magma_int_t n, double * A, magma_int_t lda, double * tau, double * work, magma_int_t lwork, magma_int_t * info )

DGELQF computes an LQ factorization of a DOUBLE PRECISION M-by-N matrix A: A = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] A DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). Higher performance is achieved if A is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lda INTEGER The leading dimension of the array A. LDA >= max(1,M). [out] tau DOUBLE PRECISION array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. TODO: work is currently unused. dgeqrf2 allocates its own work of (m + n)*nb. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_dgelqf_gpu ( magma_int_t m, magma_int_t n, magmaDouble_ptr dA, magma_int_t ldda, double * tau, double * work, magma_int_t lwork, magma_int_t * info )

DGELQF computes an LQ factorization of a DOUBLE PRECISION M-by-N matrix dA: dA = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] dA DOUBLE PRECISION array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix dA. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). [in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M). [out] tau DOUBLE PRECISION array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. Higher performance is achieved if WORK is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_sgelqf ( magma_int_t m, magma_int_t n, float * A, magma_int_t lda, float * tau, float * work, magma_int_t lwork, magma_int_t * info )

SGELQF computes an LQ factorization of a REAL M-by-N matrix A: A = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] A REAL array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). Higher performance is achieved if A is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lda INTEGER The leading dimension of the array A. LDA >= max(1,M). [out] tau REAL array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) REAL array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. TODO: work is currently unused. sgeqrf2 allocates its own work of (m + n)*nb. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_sgelqf_gpu ( magma_int_t m, magma_int_t n, magmaFloat_ptr dA, magma_int_t ldda, float * tau, float * work, magma_int_t lwork, magma_int_t * info )

SGELQF computes an LQ factorization of a REAL M-by-N matrix dA: dA = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] dA REAL array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix dA. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). [in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M). [out] tau REAL array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) REAL array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. Higher performance is achieved if WORK is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_zgelqf ( magma_int_t m, magma_int_t n, magmaDoubleComplex * A, magma_int_t lda, magmaDoubleComplex * tau, magmaDoubleComplex * work, magma_int_t lwork, magma_int_t * info )

ZGELQF computes an LQ factorization of a COMPLEX_16 M-by-N matrix A: A = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] A COMPLEX_16 array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). Higher performance is achieved if A is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lda INTEGER The leading dimension of the array A. LDA >= max(1,M). [out] tau COMPLEX_16 array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) COMPLEX_16 array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. TODO: work is currently unused. zgeqrf2 allocates its own work of (m + n)*nb. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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

 magma_int_t magma_zgelqf_gpu ( magma_int_t m, magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex * tau, magmaDoubleComplex * work, magma_int_t lwork, magma_int_t * info )

ZGELQF computes an LQ factorization of a COMPLEX_16 M-by-N matrix dA: dA = L * Q.

Parameters
 [in] m INTEGER The number of rows of the matrix A. M >= 0. [in] n INTEGER The number of columns of the matrix A. N >= 0. [in,out] dA COMPLEX_16 array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix dA. On exit, the elements on and below the diagonal of the array contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors (see Further Details). [in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M). [out] tau COMPLEX_16 array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). [out] work (workspace) COMPLEX_16 array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. Higher performance is achieved if WORK is in pinned memory, e.g. allocated using magma_malloc_pinned. [in] lwork INTEGER The dimension of the array WORK. LWORK >= max(1,M). For optimum performance LWORK >= M*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. [out] info INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.

## Further Details

The matrix Q is represented as a product of elementary reflectors

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

Each H(i) has the form

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

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