15 template<
typename T,
typename V>
19 std::is_integral_v<T> && std::is_integral_v<V>,
20 "clipCast can not be called with non-integral types!");
22 constexpr
auto max =
static_cast<V
>(std::numeric_limits<alpaka::meta::LowerMax<T, V>>
::max());
23 constexpr
auto min =
static_cast<V
>(std::numeric_limits<alpaka::meta::HigherMin<T, V>>
::min());
auto clipCast(V const &val) -> T
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto max(T const &max_ctx, Tx const &x, Ty const &y)
Returns the larger of two arguments. NaNs are treated as missing data (between a NaN and a numeric va...
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto min(T const &min_ctx, Tx const &x, Ty const &y)
Returns the smaller of two arguments. NaNs are treated as missing data (between a NaN and a numeric v...