11#ifndef TLAPACK_BLAS_IAMAX_HH
12#define TLAPACK_BLAS_IAMAX_HH
67template <TLAPACK_VECTOR vector_t,
class abs_f>
77 const idx_t n = size(
x);
93 for (idx_t
k = i + 1;
k < n; ++
k) {
157template <TLAPACK_VECTOR vector_t,
class abs_f>
167 const idx_t n = size(
x);
170 if (n <= 0)
return 0;
211 return (index != idx_t(-1)) ? index : 0;
233template <TLAPACK_VECTOR vector_t,
class abs_f>
244template <TLAPACK_VECTOR vector_t, disable_if_allow_optblas_t<vector_t> = 0>
253#ifdef TLAPACK_USE_LAPACKPP
260 auto x_ = legacy_vector(
x);
263 const auto& n =
x_.n;
265 return ::blas::iamax(n,
x_.ptr,
x_.inc);
#define TLAPACK_LEGACY_VECTOR
Macro for tlapack::concepts::LegacyVector compatible with C++17.
Definition concepts.hpp:954
size_type< vector_t > iamax(const vector_t &x, const IamaxOpts< abs_f > &opts)
Return .
Definition iamax.hpp:234
size_type< vector_t > iamax_ec(const vector_t &x, abs_f absf)
Return .
Definition iamax.hpp:68
size_type< vector_t > iamax_nc(const vector_t &x, abs_f absf)
Return .
Definition iamax.hpp:158
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
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
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
constexpr real_type< T > abs1(const T &x)
1-norm absolute value, |Re(x)| + |Im(x)|
Definition utils.hpp:133
constexpr bool isinf(const T &x) noexcept
Extends std::isinf() to complex numbers.
Definition utils.hpp:117
Options for error checking.
Definition exceptionHandling.hpp:76
Options for iamax.
Definition iamax.hpp:37
abs_f absf
Absolute value function In reference BLAS, absf(a) := |Re(a)| + |Im(a)|.
Definition iamax.hpp:41