<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
lartg.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2017-2021, University of Tennessee. All rights reserved.
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_BLAS_LARTG_HH
12#define TLAPACK_BLAS_LARTG_HH
13
15#include "tlapack/blas/rotg.hpp"
16
17namespace tlapack {
18
37template <typename T, enable_if_t<is_same_v<T, real_type<T> >, int> = 0>
38void lartg(const T& a, const T& b, real_type<T>& c, T& s, T& r)
39{
40 r = a;
41 T btemp = b;
42 rotg(r, btemp, c, s);
43}
44
45} // namespace tlapack
46
47#endif // #ifndef TLAPACK_BLAS_LARTG_HH
void rotg(T &a, T &b, T &c, T &s)
Construct plane rotation that eliminates b, such that:
Definition rotg.hpp:39
void lartg(const T &a, const T &b, real_type< T > &c, T &s, T &r)
Construct plane rotation that eliminates b, such that:
Definition lartg.hpp:38
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