<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
lassq.hpp
Go to the documentation of this file.
1
8//
9// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
10//
11// This file is part of <T>LAPACK.
12// <T>LAPACK is free software: you can redistribute it and/or modify it under
13// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
14
15#ifndef TLAPACK_LEGACY_LASSQ_HH
16#define TLAPACK_LEGACY_LASSQ_HH
17
19
20namespace tlapack {
21namespace legacy {
22
56 template <typename TX>
57 void lassq(idx_t n,
58 TX const* x,
59 int_t incx,
62 {
63 // quick return
64 if (isnan(scl) || isnan(sumsq) || n <= 0) return;
65
67 return lassq(x_, scl, sumsq));
68 }
69
70} // namespace legacy
71} // namespace tlapack
72
73#endif // TLAPACK_LEGACY_LASSQ_HH
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
void lassq(idx_t n, TX const *x, int_t incx, real_type< TX > &scl, real_type< TX > &sumsq)
Updates a sum of squares represented in scaled form.
Definition lassq.hpp:57
#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