25#ifndef _GLIBCXX_EXPERIMENTAL_SIMD_SCALAR_H_ 
   26#define _GLIBCXX_EXPERIMENTAL_SIMD_SCALAR_H_ 
   27#if __cplusplus >= 201703L 
   31_GLIBCXX_SIMD_BEGIN_NAMESPACE
 
   37template <
typename _Tp>
 
   38  _GLIBCXX_SIMD_INTRINSIC 
constexpr decltype(
auto)
 
   39  __promote_preserving_unsigned(
const _Tp& __x)
 
   41    if constexpr (is_signed_v<
decltype(+__x)> && is_unsigned_v<_Tp>)
 
   42      return static_cast<unsigned int>(__x);
 
   49struct _CommonImplScalar;
 
   50struct _CommonImplBuiltin;
 
   51struct _SimdImplScalar;
 
   52struct _MaskImplScalar;
 
   55struct simd_abi::_Scalar
 
   57  template <
typename _Tp>
 
   58    static constexpr size_t _S_size = 1;
 
   60  template <
typename _Tp>
 
   61    static constexpr size_t _S_full_size = 1;
 
   63  template <
typename _Tp>
 
   64    static constexpr bool _S_is_partial = 
false;
 
   68  template <
typename _Tp>
 
   71  template <
typename _Tp>
 
   72    struct _IsValid : __is_vectorizable<_Tp> {};
 
   74  template <
typename _Tp>
 
   75    static constexpr bool _S_is_valid_v = _IsValid<_Tp>::value;
 
   77  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
   81  using _CommonImpl = _CommonImplScalar;
 
   82  using _SimdImpl = _SimdImplScalar;
 
   83  using _MaskImpl = _MaskImplScalar;
 
   85  template <
typename _Tp, 
bool = _S_is_val
id_v<_Tp>>
 
   86    struct __traits : _InvalidTraits {};
 
   88  template <
typename _Tp>
 
   89    struct __traits<_Tp, true>
 
   92      using _SimdImpl = _SimdImplScalar;
 
   93      using _MaskImpl = _MaskImplScalar;
 
   94      using _SimdMember = _Tp;
 
   95      using _MaskMember = bool;
 
   97      static constexpr size_t _S_simd_align = 
alignof(_SimdMember);
 
   98      static constexpr size_t _S_mask_align = 
alignof(_MaskMember);
 
  101      struct _SimdCastType { _SimdCastType() = 
delete; };
 
  102      struct _MaskCastType { _MaskCastType() = 
delete; };
 
  110struct _CommonImplScalar
 
  113  template <
typename _Tp>
 
  114    _GLIBCXX_SIMD_INTRINSIC 
static void 
  115    _S_store(_Tp __x, 
void* __addr)
 
  116    { __builtin_memcpy(__addr, &__x, 
sizeof(_Tp)); }
 
  120  template <
size_t _Np, 
bool _Sanitized>
 
  121    _GLIBCXX_SIMD_INTRINSIC 
static constexpr void 
  122    _S_store_bool_array(_BitMask<_Np, _Sanitized> __x, 
bool* __mem)
 
  124      __make_dependent_t<
decltype(__x), _CommonImplBuiltin>::_S_store_bool_array(
 
  133struct _SimdImplScalar
 
  136  using abi_type = simd_abi::scalar;
 
  138  template <
typename _Tp>
 
  139    using _TypeTag = _Tp*;
 
  142  template <
typename _Tp>
 
  143    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  144    _S_broadcast(_Tp __x) 
noexcept 
  148  template <
typename _Fp, 
typename _Tp>
 
  149    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  150    _S_generator(_Fp&& __gen, _TypeTag<_Tp>)
 
  151    { 
return __gen(_SizeConstant<0>()); }
 
  154  template <
typename _Tp, 
typename _Up>
 
  155    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  156    _S_load(
const _Up* __mem, _TypeTag<_Tp>) 
noexcept 
  157    { 
return static_cast<_Tp
>(__mem[0]); }
 
  160  template <
typename _Tp, 
typename _Up>
 
  161    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  162    _S_masked_load(_Tp __merge, 
bool __k, 
const _Up* __mem) 
noexcept 
  165        __merge = 
static_cast<_Tp
>(__mem[0]);
 
  170  template <
typename _Tp, 
typename _Up>
 
  171    _GLIBCXX_SIMD_INTRINSIC 
static void 
  172    _S_store(_Tp __v, _Up* __mem, _TypeTag<_Tp>) 
noexcept 
  173    { __mem[0] = 
static_cast<_Up
>(__v); }
 
  176  template <
typename _Tp, 
typename _Up>
 
  177    _GLIBCXX_SIMD_INTRINSIC 
static void 
  178    _S_masked_store(
const _Tp __v, _Up* __mem, 
const bool __k) 
noexcept 
  179    { 
if (__k) __mem[0] = __v; }
 
  182  template <
typename _Tp>
 
  183    _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  184    _S_negate(_Tp __x) 
noexcept 
  188  template <
typename _Tp, 
typename _BinaryOperation>
 
  189    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  190    _S_reduce(
const simd<_Tp, simd_abi::scalar>& __x, 
const _BinaryOperation&)
 
  191    { 
return __x._M_data; }
 
  194  template <
typename _Tp>
 
  195    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  196    _S_min(
const _Tp __a, 
const _Tp __b)
 
  199  template <
typename _Tp>
 
  200    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  201    _S_max(
const _Tp __a, 
const _Tp __b)
 
  205  template <
typename _Tp>
 
  206    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  207    _S_complement(_Tp __x) 
noexcept 
  208    { 
return static_cast<_Tp
>(~__x); }
 
  211  template <
typename _Tp>
 
  212    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  213    _S_unary_minus(_Tp __x) 
noexcept 
  214    { 
return static_cast<_Tp
>(-__x); }
 
  217  template <
typename _Tp>
 
  218    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  219    _S_plus(_Tp __x, _Tp __y)
 
  221      return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  222                              + __promote_preserving_unsigned(__y));
 
  225  template <
typename _Tp>
 
  226    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  227    _S_minus(_Tp __x, _Tp __y)
 
  229      return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  230                              - __promote_preserving_unsigned(__y));
 
  233  template <
typename _Tp>
 
  234    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  235    _S_multiplies(_Tp __x, _Tp __y)
 
  237      return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  238                              * __promote_preserving_unsigned(__y));
 
  241  template <
typename _Tp>
 
  242    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  243    _S_divides(_Tp __x, _Tp __y)
 
  245      return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  246                              / __promote_preserving_unsigned(__y));
 
  249  template <
typename _Tp>
 
  250    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  251    _S_modulus(_Tp __x, _Tp __y)
 
  253      return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  254                              % __promote_preserving_unsigned(__y));
 
  257  template <
typename _Tp>
 
  258    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  259    _S_bit_and(_Tp __x, _Tp __y)
 
  261      if constexpr (is_floating_point_v<_Tp>)
 
  263          using _Ip = __int_for_sizeof_t<_Tp>;
 
  264          return __bit_cast<_Tp>(__bit_cast<_Ip>(__x) & __bit_cast<_Ip>(__y));
 
  267        return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  268                                & __promote_preserving_unsigned(__y));
 
  271  template <
typename _Tp>
 
  272    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  273    _S_bit_or(_Tp __x, _Tp __y)
 
  275      if constexpr (is_floating_point_v<_Tp>)
 
  277          using _Ip = __int_for_sizeof_t<_Tp>;
 
  278          return __bit_cast<_Tp>(__bit_cast<_Ip>(__x) | __bit_cast<_Ip>(__y));
 
  281        return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  282                                | __promote_preserving_unsigned(__y));
 
  285  template <
typename _Tp>
 
  286    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  287    _S_bit_xor(_Tp __x, _Tp __y)
 
  289      if constexpr (is_floating_point_v<_Tp>)
 
  291          using _Ip = __int_for_sizeof_t<_Tp>;
 
  292          return __bit_cast<_Tp>(__bit_cast<_Ip>(__x) ^ __bit_cast<_Ip>(__y));
 
  295        return static_cast<_Tp
>(__promote_preserving_unsigned(__x)
 
  296                                ^ __promote_preserving_unsigned(__y));
 
  299  template <
typename _Tp>
 
  300    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  301    _S_bit_shift_left(_Tp __x, 
int __y)
 
  302    { 
return static_cast<_Tp
>(__promote_preserving_unsigned(__x) << __y); }
 
  304  template <
typename _Tp>
 
  305    _GLIBCXX_SIMD_INTRINSIC 
static constexpr _Tp
 
  306    _S_bit_shift_right(_Tp __x, 
int __y)
 
  307    { 
return static_cast<_Tp
>(__promote_preserving_unsigned(__x) >> __y); }
 
  311  template <
typename _Tp>
 
  312    using _ST = _SimdTuple<_Tp, simd_abi::scalar>;
 
  314  template <
typename _Tp>
 
  315    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  319  template <
typename _Tp>
 
  320    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  324  template <
typename _Tp>
 
  325    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  329  template <
typename _Tp>
 
  330    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  334  template <
typename _Tp>
 
  335    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  339  template <
typename _Tp>
 
  340    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  344  template <
typename _Tp>
 
  345    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  349  template <
typename _Tp>
 
  350    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  354  template <
typename _Tp>
 
  355    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  359  template <
typename _Tp>
 
  360    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  364  template <
typename _Tp>
 
  365    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  369  template <
typename _Tp>
 
  370    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  374  template <
typename _Tp>
 
  375    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  376    _S_atan2(_Tp __x, _Tp __y)
 
  377    { 
return std::atan2(__x, __y); }
 
  379  template <
typename _Tp>
 
  380    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  384  template <
typename _Tp>
 
  385    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  387    { 
return std::exp2(__x); }
 
  389  template <
typename _Tp>
 
  390    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  392    { 
return std::expm1(__x); }
 
  394  template <
typename _Tp>
 
  395    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  399  template <
typename _Tp>
 
  400    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  404  template <
typename _Tp>
 
  405    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  407    { 
return std::log1p(__x); }
 
  409  template <
typename _Tp>
 
  410    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  412    { 
return std::log2(__x); }
 
  414  template <
typename _Tp>
 
  415    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  417    { 
return std::logb(__x); }
 
  419  template <
typename _Tp>
 
  420    _GLIBCXX_SIMD_INTRINSIC 
static _ST<int>
 
  422    { 
return {std::ilogb(__x)}; }
 
  424  template <
typename _Tp>
 
  425    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  426    _S_pow(_Tp __x, _Tp __y)
 
  429  template <
typename _Tp>
 
  430    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  434  template <
typename _Tp>
 
  435    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  439  template <
typename _Tp>
 
  440    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  444  template <
typename _Tp>
 
  445    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  447    { 
return std::cbrt(__x); }
 
  449  template <
typename _Tp>
 
  450    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  452    { 
return std::erf(__x); }
 
  454  template <
typename _Tp>
 
  455    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  457    { 
return std::erfc(__x); }
 
  459  template <
typename _Tp>
 
  460    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  462    { 
return std::lgamma(__x); }
 
  464  template <
typename _Tp>
 
  465    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  467    { 
return std::tgamma(__x); }
 
  469  template <
typename _Tp>
 
  470    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  472    { 
return std::trunc(__x); }
 
  474  template <
typename _Tp>
 
  475    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  477    { 
return std::floor(__x); }
 
  479  template <
typename _Tp>
 
  480    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  482    { 
return std::ceil(__x); }
 
  484  template <
typename _Tp>
 
  485    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  486    _S_nearbyint(_Tp __x)
 
  487    { 
return std::nearbyint(__x); }
 
  489  template <
typename _Tp>
 
  490    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  492    { 
return std::rint(__x); }
 
  494  template <
typename _Tp>
 
  495    _GLIBCXX_SIMD_INTRINSIC 
static _ST<long>
 
  497    { 
return {std::lrint(__x)}; }
 
  499  template <
typename _Tp>
 
  500    _GLIBCXX_SIMD_INTRINSIC 
static _ST<long long>
 
  502    { 
return {std::llrint(__x)}; }
 
  504  template <
typename _Tp>
 
  505    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  507    { 
return std::round(__x); }
 
  509  template <
typename _Tp>
 
  510    _GLIBCXX_SIMD_INTRINSIC 
static _ST<long>
 
  512    { 
return {std::lround(__x)}; }
 
  514  template <
typename _Tp>
 
  515    _GLIBCXX_SIMD_INTRINSIC 
static _ST<long long>
 
  517    { 
return {std::llround(__x)}; }
 
  519  template <
typename _Tp>
 
  520    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  521    _S_ldexp(_Tp __x, _ST<int> __y)
 
  522    { 
return std::ldexp(__x, __y.first); }
 
  524  template <
typename _Tp>
 
  525    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  526    _S_scalbn(_Tp __x, _ST<int> __y)
 
  527    { 
return std::scalbn(__x, __y.first); }
 
  529  template <
typename _Tp>
 
  530    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  531    _S_scalbln(_Tp __x, _ST<long> __y)
 
  532    { 
return std::scalbln(__x, __y.first); }
 
  534  template <
typename _Tp>
 
  535    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  536    _S_fmod(_Tp __x, _Tp __y)
 
  537    { 
return std::fmod(__x, __y); }
 
  539  template <
typename _Tp>
 
  540    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  541    _S_remainder(_Tp __x, _Tp __y)
 
  542    { 
return std::remainder(__x, __y); }
 
  544  template <
typename _Tp>
 
  545    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  546    _S_nextafter(_Tp __x, _Tp __y)
 
  547    { 
return std::nextafter(__x, __y); }
 
  549  template <
typename _Tp>
 
  550    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  551    _S_fdim(_Tp __x, _Tp __y)
 
  552    { 
return std::fdim(__x, __y); }
 
  554  template <
typename _Tp>
 
  555    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  556    _S_fmax(_Tp __x, _Tp __y)
 
  557    { 
return std::fmax(__x, __y); }
 
  559  template <
typename _Tp>
 
  560    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  561    _S_fmin(_Tp __x, _Tp __y)
 
  562    { 
return std::fmin(__x, __y); }
 
  564  template <
typename _Tp>
 
  565    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  566    _S_fma(_Tp __x, _Tp __y, _Tp __z)
 
  567    { 
return std::fma(__x, __y, __z); }
 
  569  template <
typename _Tp>
 
  570    _GLIBCXX_SIMD_INTRINSIC 
static _Tp
 
  571    _S_remquo(_Tp __x, _Tp __y, _ST<int>* __z)
 
  572    { 
return std::remquo(__x, __y, &__z->first); }
 
  574  template <
typename _Tp>
 
  575    _GLIBCXX_SIMD_INTRINSIC 
constexpr static _ST<int>
 
  576    _S_fpclassify(_Tp __x)
 
  577    { 
return {std::fpclassify(__x)}; }
 
  579  template <
typename _Tp>
 
  580    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  582    { 
return std::isfinite(__x); }
 
  584  template <
typename _Tp>
 
  585    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  587    { 
return std::isinf(__x); }
 
  589  template <
typename _Tp>
 
  590    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  592    { 
return std::isnan(__x); }
 
  594  template <
typename _Tp>
 
  595    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  597    { 
return std::isnormal(__x); }
 
  599  template <
typename _Tp>
 
  600    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  602    { 
return std::signbit(__x); }
 
  604  template <
typename _Tp>
 
  605    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  606    _S_isgreater(_Tp __x, _Tp __y)
 
  607    { 
return std::isgreater(__x, __y); }
 
  609  template <
typename _Tp>
 
  610    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  611    _S_isgreaterequal(_Tp __x, _Tp __y)
 
  612    { 
return std::isgreaterequal(__x, __y); }
 
  614  template <
typename _Tp>
 
  615    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  616    _S_isless(_Tp __x, _Tp __y)
 
  617    { 
return std::isless(__x, __y); }
 
  619  template <
typename _Tp>
 
  620    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  621    _S_islessequal(_Tp __x, _Tp __y)
 
  622    { 
return std::islessequal(__x, __y); }
 
  624  template <
typename _Tp>
 
  625    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  626    _S_islessgreater(_Tp __x, _Tp __y)
 
  627    { 
return std::islessgreater(__x, __y); }
 
  629  template <
typename _Tp>
 
  630    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  631    _S_isunordered(_Tp __x, _Tp __y)
 
  632    { 
return std::isunordered(__x, __y); }
 
  635  template <
typename _Tp>
 
  636    _GLIBCXX_SIMD_INTRINSIC 
constexpr static void 
  637    _S_increment(_Tp& __x)
 
  640  template <
typename _Tp>
 
  641    _GLIBCXX_SIMD_INTRINSIC 
constexpr static void 
  642    _S_decrement(_Tp& __x)
 
  647  template <
typename _Tp>
 
  648    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  649    _S_equal_to(_Tp __x, _Tp __y)
 
  650    { 
return __x == __y; }
 
  652  template <
typename _Tp>
 
  653    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  654    _S_not_equal_to(_Tp __x, _Tp __y)
 
  655    { 
return __x != __y; }
 
  657  template <
typename _Tp>
 
  658    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  659    _S_less(_Tp __x, _Tp __y)
 
  660    { 
return __x < __y; }
 
  662  template <
typename _Tp>
 
  663    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  664    _S_less_equal(_Tp __x, _Tp __y)
 
  665    { 
return __x <= __y; }
 
  668  template <
typename _Tp, 
typename _Up>
 
  669    _GLIBCXX_SIMD_INTRINSIC 
constexpr static void 
  670    _S_set(_Tp& __v, [[maybe_unused]] 
int __i, _Up&& __x) 
noexcept 
  672      _GLIBCXX_DEBUG_ASSERT(__i == 0);
 
  673      __v = 
static_cast<_Up&&
>(__x);
 
  677  template <
typename _Tp>
 
  678    _GLIBCXX_SIMD_INTRINSIC 
constexpr static void 
  679    _S_masked_assign(
bool __k, _Tp& __lhs, _Tp __rhs)
 
  680    { 
if (__k) __lhs = __rhs; }
 
  683  template <
typename _Op, 
typename _Tp>
 
  684    _GLIBCXX_SIMD_INTRINSIC 
constexpr static void 
  685    _S_masked_cassign(
const bool __k, _Tp& __lhs, 
const _Tp __rhs, _Op __op)
 
  686    { 
if (__k) __lhs = __op(_SimdImplScalar{}, __lhs, __rhs); }
 
  689  template <
template <
typename> 
class _Op, 
typename _Tp>
 
  690    _GLIBCXX_SIMD_INTRINSIC 
constexpr static _Tp
 
  691    _S_masked_unary(
const bool __k, 
const _Tp __v)
 
  692    { 
return static_cast<_Tp
>(__k ? _Op<_Tp>{}(__v) : __v); }
 
  699struct _MaskImplScalar
 
  702  template <
typename _Tp>
 
  703    using _TypeTag = _Tp*;
 
  708    _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  709    _S_broadcast(
bool __x)
 
  715    _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  716    _S_load(
const bool* __mem)
 
  721  _GLIBCXX_SIMD_INTRINSIC 
static constexpr _SanitizedBitMask<1>
 
  727  template <
typename, 
bool _Sanitized>
 
  728    _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  729    _S_convert(_BitMask<1, _Sanitized> __x)
 
  732  template <
typename, 
typename _Up, 
typename _UAbi>
 
  733    _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  734    _S_convert(simd_mask<_Up, _UAbi> __x)
 
  739  template <
typename _Tp>
 
  740    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  741    _S_from_bitmask(_SanitizedBitMask<1> __bits, _TypeTag<_Tp>) 
noexcept 
  742    { 
return __bits[0]; }
 
  745  _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  746  _S_masked_load(
bool __merge, 
bool __mask, 
const bool* __mem) 
noexcept 
  754  _GLIBCXX_SIMD_INTRINSIC 
static void 
  755  _S_store(
bool __v, 
bool* __mem) 
noexcept 
  759  _GLIBCXX_SIMD_INTRINSIC 
static void 
  760  _S_masked_store(
const bool __v, 
bool* __mem, 
const bool __k) 
noexcept 
  767  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  768  _S_logical_and(
bool __x, 
bool __y)
 
  769  { 
return __x && __y; }
 
  771  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  772  _S_logical_or(
bool __x, 
bool __y)
 
  773  { 
return __x || __y; }
 
  775  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  779  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  780  _S_bit_and(
bool __x, 
bool __y)
 
  781  { 
return __x && __y; }
 
  783  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  784  _S_bit_or(
bool __x, 
bool __y)
 
  785  { 
return __x || __y; }
 
  787  _GLIBCXX_SIMD_INTRINSIC 
static constexpr bool 
  788  _S_bit_xor(
bool __x, 
bool __y)
 
  789  { 
return __x != __y; }
 
  792  _GLIBCXX_SIMD_INTRINSIC 
constexpr static void 
  793  _S_set(
bool& __k, [[maybe_unused]] 
int __i, 
bool __x) 
noexcept 
  795    _GLIBCXX_DEBUG_ASSERT(__i == 0);
 
  800  _GLIBCXX_SIMD_INTRINSIC 
static void 
  801  _S_masked_assign(
bool __k, 
bool& __lhs, 
bool __rhs)
 
  809  template <
typename _Tp, 
typename _Abi>
 
  810    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  811    _S_all_of(simd_mask<_Tp, _Abi> __k)
 
  812    { 
return __k._M_data; }
 
  816  template <
typename _Tp, 
typename _Abi>
 
  817    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  818    _S_any_of(simd_mask<_Tp, _Abi> __k)
 
  819    { 
return __k._M_data; }
 
  823  template <
typename _Tp, 
typename _Abi>
 
  824    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  825    _S_none_of(simd_mask<_Tp, _Abi> __k)
 
  826    { 
return !__k._M_data; }
 
  830  template <
typename _Tp, 
typename _Abi>
 
  831    _GLIBCXX_SIMD_INTRINSIC 
constexpr static bool 
  832    _S_some_of(simd_mask<_Tp, _Abi>)
 
  837  template <
typename _Tp, 
typename _Abi>
 
  838    _GLIBCXX_SIMD_INTRINSIC 
constexpr static int 
  839    _S_popcount(simd_mask<_Tp, _Abi> __k)
 
  840    { 
return __k._M_data; }
 
  844  template <
typename _Tp, 
typename _Abi>
 
  845    _GLIBCXX_SIMD_INTRINSIC 
constexpr static int 
  846    _S_find_first_set(simd_mask<_Tp, _Abi>)
 
  851  template <
typename _Tp, 
typename _Abi>
 
  852    _GLIBCXX_SIMD_INTRINSIC 
constexpr static int 
  853    _S_find_last_set(simd_mask<_Tp, _Abi>)
 
  861_GLIBCXX_SIMD_END_NAMESPACE
 
complex< _Tp > log10(const complex< _Tp > &)
Return complex base 10 logarithm of z.
 
complex< _Tp > sin(const complex< _Tp > &)
Return complex sine of z.
 
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
 
complex< _Tp > tan(const complex< _Tp > &)
Return complex tangent of z.
 
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
 
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
 
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
 
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
 
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
 
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
 
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
 
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
 
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
 
constexpr const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
 
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
 
_Tp fabs(const std::complex< _Tp > &)
fabs(__z) [8.1.8].
 
std::complex< _Tp > asinh(const std::complex< _Tp > &)
asinh(__z) [8.1.6].
 
std::complex< _Tp > atan(const std::complex< _Tp > &)
atan(__z) [8.1.4].
 
std::complex< _Tp > atanh(const std::complex< _Tp > &)
atanh(__z) [8.1.7].
 
std::complex< _Tp > acosh(const std::complex< _Tp > &)
acosh(__z) [8.1.5].
 
std::complex< _Tp > acos(const std::complex< _Tp > &)
acos(__z) [8.1.2].
 
std::complex< _Tp > asin(const std::complex< _Tp > &)
asin(__z) [8.1.3].