Saturated arithmetics functions¶
satadd
function¶
template <typename T1, typename T2,
KFR_ENABLE_IF(is_numeric_args<T1, T2>),
typename Tout = std::common_type_t<T1, T2>>
Tout satadd(const T1 &x, const T2 &y)
Adds two arguments using saturation
Source code
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>),
typename Tout = std::common_type_t<T1, T2>>
KFR_INTRINSIC Tout satadd(const T1& x, const T2& y)
{
return intrinsics::satadd(x, y);
}
https://github.com/kfrlib/kfr/blob//include/kfr/simd/saturation.hpp#L38
satsub
function¶
template <typename T1, typename T2,
KFR_ENABLE_IF(is_numeric_args<T1, T2>),
typename Tout = std::common_type_t<T1, T2>>
Tout satsub(const T1 &x, const T2 &y)
Subtracts two arguments using saturation
Source code
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>),
typename Tout = std::common_type_t<T1, T2>>
KFR_INTRINSIC Tout satsub(const T1& x, const T2& y)
{
return intrinsics::satsub(x, y);
}
https://github.com/kfrlib/kfr/blob//include/kfr/simd/saturation.hpp#L46
Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/