14#include <xvec/detail/config.hpp>
15#include <xvec/detail/utilities.hpp>
17namespace _XVEC_NAMESPACE::simd
34template<vec_
integral _Vp>
constexpr _Vp
saturating_add(
const _Vp& lhs,
const _Vp& rhs)
noexcept {
35 if (std::is_constant_evaluated())
46template<vec_
integral _Vp>
constexpr _Vp
saturating_sub(
const _Vp& lhs,
const _Vp& rhs)
noexcept {
47 if (std::is_constant_evaluated())
58template<vec_
integral _Vp>
constexpr _Vp
saturating_mul(
const _Vp& lhs,
const _Vp& rhs)
noexcept
66template<vec_
integral _Vp>
constexpr _Vp
saturating_div(
const _Vp& lhs,
const _Vp& rhs)
noexcept
76template<std::
integral _Up, vec_
integral _Vp>
78 if (std::is_constant_evaluated())
constexpr rebind_t< _Up, _Vp > saturating_cast(const _Vp &v) noexcept
Compute a basic_vec where every element is converted to the new type, or if the value can't be repres...
Definition std_numeric.hpp:77
constexpr _Vp saturating_div(const _Vp &lhs, const _Vp &rhs) noexcept
Compute the saturated division of each respective pair of SIMD elements.
Definition std_numeric.hpp:66
constexpr _Vp saturating_mul(const _Vp &lhs, const _Vp &rhs) noexcept
Compute the saturated multiplication of each respective pair of SIMD elements.
Definition std_numeric.hpp:58
constexpr _Vp saturating_add(const _Vp &lhs, const _Vp &rhs) noexcept
Compute the saturated addition of each respective pair of SIMD elements.
Definition std_numeric.hpp:34
constexpr _Vp saturating_sub(const _Vp &lhs, const _Vp &rhs) noexcept
Compute the saturated subtraction of each respective pair of SIMD elements.
Definition std_numeric.hpp:46
constexpr T saturating_sub(T lhs, T rhs) noexcept
Subtract two integers, clamping an unrepresentable mathematical result.
Definition compat.hpp:90
constexpr T saturating_div(T lhs, T rhs) noexcept
Divide two integers, clamping an unrepresentable mathematical result.
Definition compat.hpp:138
constexpr T saturating_add(T lhs, T rhs) noexcept
Add two integers, clamping an unrepresentable mathematical result.
Definition compat.hpp:68
constexpr To saturating_cast(From value) noexcept
Definition compat.hpp:50
constexpr T saturating_mul(T lhs, T rhs) noexcept
Multiply two integers, clamping an unrepresentable mathematical result.
Definition compat.hpp:114