Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
base::internal::ClampedMulFastAsmOp< T, U > Struct Template Reference

#include <safe_math_arm_impl.h>

Public Types

using Promotion = typename FastIntegerArithmeticPromotion< T, U >::type
 

Public Member Functions

template<typename V >
 __attribute__ ((always_inline)) static V Do(T x
 
return saturated_cast (static_cast< Promotion >(x) *static_cast< Promotion >(y))
 

Static Public Member Functions

template<typename V >
static constexpr V Do (T, U)
 

Public Attributes

y
 

Static Public Attributes

static const bool is_supported = CheckedMulFastAsmOp<T, U>::is_supported
 

Detailed Description

template<typename T, typename U>
struct base::internal::ClampedMulFastAsmOp< T, U >

Definition at line 97 of file safe_math_arm_impl.h.

Member Typedef Documentation

◆ Promotion

template<typename T , typename U >
using base::internal::ClampedMulFastAsmOp< T, U >::Promotion = typename FastIntegerArithmeticPromotion<T, U>::type

Definition at line 113 of file safe_math_arm_impl.h.

Member Function Documentation

◆ __attribute__()

template<typename T , typename U >
template<typename V >
base::internal::ClampedMulFastAsmOp< T, U >::__attribute__ ( (always_inline)  )

◆ Do()

template<typename T , typename U >
template<typename V >
static constexpr V base::internal::ClampedMulFastAsmOp< T, U >::Do ( T  ,
 
)
inlinestaticconstexpr

Definition at line 61 of file safe_math_clang_gcc_impl.h.

61 {
62 // Force a compile failure if instantiated.
63 return CheckOnFailure::template HandleFailure<V>();
64 }

◆ saturated_cast()

template<typename T , typename U >
return base::internal::ClampedMulFastAsmOp< T, U >::saturated_cast ( static_cast< Promotion x) *static_cast< Promotion >(y)

Member Data Documentation

◆ is_supported

template<typename T , typename U >
static const bool base::internal::ClampedMulFastAsmOp< T, U >::is_supported = CheckedMulFastAsmOp<T, U>::is_supported
static

Definition at line 98 of file safe_math_arm_impl.h.

◆ y

template<typename T , typename U >
U base::internal::ClampedMulFastAsmOp< T, U >::y
Initial value:

Definition at line 101 of file safe_math_arm_impl.h.

101 {
102 // Use the CheckedMulFastAsmOp for full-width 32-bit values, because
103 // it's fewer instructions than promoting and then saturating.
106 V result;
108 return result;
109 return CommonMaxOrMin<V>(IsValueNegative(x) ^ IsValueNegative(y));
110 }

The documentation for this struct was generated from the following files: