35#ifndef _BLAZE_MATH_DENSE_LQ_H_
36#define _BLAZE_MATH_DENSE_LQ_H_
75template<
typename MT1,
bool SO1,
typename MT2,
bool SO2,
typename MT3,
bool SO3 >
93template<
typename MT1 >
115template<
typename MT1 >
173template<
typename MT1
195 const size_t m( (*A).rows() );
196 const size_t n( (*A).columns() );
197 const size_t mindim(
min( m, n ) );
208 const std::unique_ptr<ET1[]> tau(
new ET1[mindim] );
209 decltype(
auto) l( derestrict( *L ) );
214 gelqf( *Q, tau.get() );
216 resize( *L, m, m,
false );
219 for(
size_t i=0UL; i<m; ++i ) {
220 for(
size_t j=0UL; j<
min(i+1UL,n); ++j ) {
225 lq_backend( *Q, tau.get() );
230 gelqf( l, tau.get() );
232 lq_backend( *Q, tau.get() );
234 for(
size_t i=0UL; i<m; ++i ) {
235 for(
size_t j=i+1UL; j<n; ++j ) {
Constraint on the data type.
Header file for auxiliary alias declarations.
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
Constraint on the data type.
Header file for the EnableIf class template.
Constraint on the data type.
Header file for the IsResizable type trait.
Header file for the IsSquare type trait.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Base class for dense matrices.
Definition DenseMatrix.h:82
Header file for the DenseMatrix base class.
Header file for the LAPACK LQ decomposition functions (gelqf).
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
void lq(const DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &Q, DenseMatrix< MT3, SO3 > &R)
LQ decomposition of the given dense matrix.
Definition LQ.h:179
void orglq(blas_int_t m, blas_int_t n, blas_int_t k, float *A, blas_int_t lda, const float *tau, float *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.
Definition orglq.h:125
void gelqf(blas_int_t m, blas_int_t n, float *A, blas_int_t lda, float *tau, float *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for the LQ decomposition of the given dense single precision column-major matrix.
Definition gelqf.h:153
void unglq(blas_int_t m, blas_int_t n, blas_int_t k, complex< float > *A, blas_int_t lda, const complex< float > *tau, complex< float > *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.
Definition unglq.h:127
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.
Definition BLASCompatible.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition Upper.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_STRICTLY_TRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.
Definition StrictlyTriangular.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE(T)
Constraint on the data type.
Definition Adaptor.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.
Definition UniTriangular.h:81
constexpr bool IsSquare_v
Auxiliary variable template for the IsSquare type trait.
Definition IsSquare.h:146
constexpr bool IsResizable_v
Auxiliary variable template for the IsResizable type trait.
Definition IsResizable.h:136
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition Matrix.h:806
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition Matrix.h:1108
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition Submatrix.h:181
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
Header file for the exception macros of the math module.
Header file for the LAPACK functions to reconstruct Q from a LQ decomposition (orglq).
Header file for the LAPACK functions to reconstruct Q from a LQ decomposition (unglq).
Header file for the generic min algorithm.
Header file for the implementation of the Submatrix view.