8#ifndef KERNEL_LAFEM_ARCH_MIN_MAX_VALUE_BLOCK_HPP
9#error "Do not include this implementation-only header file directly!"
12#include <kernel/util/math.hpp>
14namespace FEAT::LAFEM::Arch
16 template <
typename ValueType_>
17 ValueType_ MinMaxValueBlock::exec_generic_impl(
const ValueType_ *
const x,
const Index size,
const bool min_,
const bool abs_)
19 ValueType_ result(x[0]);
23 for(
int j(0); j < ValueType_::n; ++j)
33 for (
Index i(0) ; i < size ; ++i)
35 for(
int j(0); j < ValueType_::n; ++j)
43 for (
Index i(0) ; i < size ; ++i)
45 for(
int j(0); j < ValueType_::n; ++j)
47 result[j] =
Math::min(result[j], x[i][j]);
56 for (
Index i(0) ; i < size ; ++i)
58 for(
int j(0); j < ValueType_::n; ++j)
66 for (
Index i(0) ; i < size ; ++i)
68 for(
int j(0); j < ValueType_::n; ++j)
70 result[j] =
Math::max(result[j], x[i][j]);
T_ abs(T_ x)
Returns the absolute value.
T_ min(T_ a, T_ b)
Returns the minimum of two values.
T_ max(T_ a, T_ b)
Returns the maximum of two values.
std::uint64_t Index
Index data type.