<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
unmqr.hpp
Go to the documentation of this file.
1
4//
5// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
6//
7// This file is part of <T>LAPACK.
8// <T>LAPACK is free software: you can redistribute it and/or modify it under
9// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
10
11#ifndef TLAPACK_LEGACY_UNMQR_HH
12#define TLAPACK_LEGACY_UNMQR_HH
13
15
16namespace tlapack {
17namespace legacy {
18
76 template <class side_t, class trans_t, typename TA, typename TC>
79 idx_t m,
80 idx_t n,
81 idx_t k,
82 TA const* A,
83 idx_t lda,
84 TA const* tau,
85 TC* C,
86 idx_t ldc)
87 {
88 using internal::create_matrix;
89 using internal::create_vector;
90
91 // check arguments
92 tlapack_check_false(side != Side::Left && side != Side::Right);
93 tlapack_check_false(trans != Op::NoTrans && trans != Op::Trans &&
94 trans != Op::ConjTrans);
95
96 // Matrix views
97 const auto A_ = (side == Side::Left)
98 ? create_matrix<TA>((TA*)A, m, k, lda)
99 : create_matrix<TA>((TA*)A, n, k, lda);
100 const auto tau_ = create_vector((TA*)tau, k);
101 auto C_ = create_matrix<TC>(C, m, n, ldc);
102
103 return unmqr(side, trans, A_, tau_, C_);
104 }
105
106} // namespace legacy
107} // namespace tlapack
108
109#endif // TLAPACK_LEGACY_UNMQR_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
int unmqr(side_t side, trans_t trans, idx_t m, idx_t n, idx_t k, TA const *A, idx_t lda, TA const *tau, TC *C, idx_t ldc)
Multiplies the general m-by-n matrix C by Q from geqrf() using a blocked code as follows:
Definition unmqr.hpp:77
Multiplies the general m-by-n matrix C by Q from tlapack::geqrf()
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