<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
geqr2.hpp
Go to the documentation of this file.
1
5//
6// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
7//
8// This file is part of <T>LAPACK.
9// <T>LAPACK is free software: you can redistribute it and/or modify it under
10// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
11
12#ifndef TLAPACK_LEGACY_GEQR2_HH
13#define TLAPACK_LEGACY_GEQR2_HH
14
16
17namespace tlapack {
18namespace legacy {
19
39 template <typename TA, typename TT>
40 int geqr2(idx_t m, idx_t n, TA* A, idx_t lda, TT* tau)
41 {
42 using internal::create_matrix;
43 using internal::create_vector;
44
45 // check arguments
49
50 // quick return
51 if (n <= 0) return 0;
52
53 // Matrix views
54 auto A_ = create_matrix(A, m, n, lda);
55 auto tau_ = create_vector(tau, min(m, n));
56
57 return geqr2(A_, tau_);
58 }
59
60} // namespace legacy
61} // namespace tlapack
62
63#endif // TLAPACK_LEGACY_GEQR2_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
int geqr2(idx_t m, idx_t n, TA *A, idx_t lda, TT *tau)
Computes a QR factorization of a matrix A.
Definition geqr2.hpp:40
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113