5#ifndef BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
6#define BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
17template <
typename T,
typename U>
38 presult =
static_cast<Promotion
>(
x) *
static_cast<Promotion
>(
y);
40 return IsValueInRangeForNumericType<V>(
presult);
44template <
typename T,
typename U>
57 return saturated_cast<V>(
x +
y);
60 int32_t
x_i32 = checked_cast<int32_t>(
x);
61 int32_t
y_i32 = checked_cast<int32_t>(
y);
63 asm(
"qadd %[result], %[first], %[second]"
70template <
typename T,
typename U>
83 return saturated_cast<V>(
x -
y);
86 int32_t
x_i32 = checked_cast<int32_t>(
x);
87 int32_t
y_i32 = checked_cast<int32_t>(
y);
89 asm(
"qsub %[result], %[first], %[second]"
96template <
typename T,
typename U>
100 template <
typename V>
T __attribute__((ext_vector_type(N))) V
constexpr bool IsValueNegative(T value)
static constexpr bool Do(T, U, V *)
static const bool is_supported
__attribute__((always_inline)) static bool Do(T x
static const bool is_supported
__attribute__((always_inline)) static V Do(T x
static constexpr V Do(T, U)
typename FastIntegerArithmeticPromotion< T, U >::type Promotion
__attribute__((always_inline)) static V Do(T x
static const bool is_supported
static constexpr V Do(T, U)
static const bool is_supported
static constexpr V Do(T, U)
__attribute__((always_inline)) static V Do(T x