4#ifndef TETL_LINALG_BLAS1_VECTOR_IDX_ABS_MAX_HPP
5#define TETL_LINALG_BLAS1_VECTOR_IDX_ABS_MAX_HPP
7#include <etl/_limits/numeric_limits.hpp>
8#include <etl/_linalg/concepts.hpp>
9#include <etl/_type_traits/is_arithmetic.hpp>
10#include <etl/_utility/cmp_less.hpp>
15template <in_vector InVec>
18 constexpr auto getValue = [](
typename InVec::value_type
const& val) {
19 if constexpr (is_arithmetic_v<
typename InVec::value_type>) {
20 return detail::abs_if_needed(val);
22 auto const re = detail::abs_if_needed(detail::real_if_needed(val));
23 auto const im = detail::abs_if_needed(detail::imag_if_needed(val));
31 for (
typename InVec::size_type i{0};
etl::cmp_less(i, v.extent(0)); ++i) {
32 if (
auto const val = getValue(v(i)); val > maxV) {
constexpr auto idx_abs_max(InVec v) -> typename InVec::size_type
Definition blas1_vector_idx_abs_max.hpp:16
Definition accessor_conjugate.hpp:13
Definition adjacent_find.hpp:9
Definition numeric_limits.hpp:18