11#ifndef TLAPACK_BLAS_ASUM_HH
12#define TLAPACK_BLAS_ASUM_HH
26template <TLAPACK_VECTOR vector_t, disable_if_allow_optblas_t<vector_t> = 0>
34 const idx_t n = size(
x);
37 for (idx_t i = 0; i < n; ++i)
43#ifdef TLAPACK_USE_LAPACKPP
46 enable_if_allow_optblas_t<vector_t> = 0>
47auto asum(vector_t
const& x)
50 auto x_ = legacy_vector(x);
55 return ::blas::asum(n, x_.ptr, x_.inc);
constexpr real_type< T > abs1(const T &x)
1-norm absolute value, |Re(x)| + |Im(x)|
Definition utils.hpp:133
#define TLAPACK_LEGACY_VECTOR
Macro for tlapack::concepts::LegacyVector compatible with C++17.
Definition concepts.hpp:954
auto asum(vector_t const &x)
Vector 1-norm: .
Definition asum.hpp:27
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