<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
larf.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_LARF_HH
13#define TLAPACK_LEGACY_LARF_HH
14
16
17namespace tlapack {
18namespace legacy {
19
27 template <class side_t, typename TV, typename TC>
29 idx_t m,
30 idx_t n,
31 TV const* v,
32 int_t incv,
34 TC* C,
35 idx_t ldC)
36 {
37 using internal::create_matrix;
38
39 // check arguments
40 tlapack_check_false(side != Side::Left && side != Side::Right);
45
46 // Initialize indexes
47 idx_t lenv = ((side == Side::Left) ? m : n);
48
49 // Matrix views
50 auto C_ = create_matrix<TC>(C, m, n, ldC);
51
53 v_, TV, lenv, v, incv,
55 }
56
57} // namespace legacy
58} // namespace tlapack
59
60#endif // TLAPACK_LEGACY_LARF_HH
constexpr internal::Forward FORWARD
Forward direction.
Definition types.hpp:376
constexpr internal::ColumnwiseStorage COLUMNWISE_STORAGE
Columnwise storage.
Definition types.hpp:409
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
void larf(side_t side, idx_t m, idx_t n, TV const *v, int_t incv, scalar_type< TV, TC > tau, TC *C, idx_t ldC)
Applies an elementary reflector H to a m-by-n matrix C.
Definition larf.hpp:28
#define tlapack_expr_with_vector(x, TX, n, X, incx, expr)
Creates a vector object and executes an expression with it.
Definition utils.hpp:68
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