Lines Matching refs:_Tp

592 template <typename _Tp>
595 __gcc_atomic::__can_assign<volatile _Atomic(_Tp)*, _Tp>::value>::type
596 __c11_atomic_init(volatile _Atomic(_Tp)* __a, _Tp __val) {
600 template <typename _Tp>
603 !__gcc_atomic::__can_assign<volatile _Atomic(_Tp)*, _Tp>::value &&
604 __gcc_atomic::__can_assign< _Atomic(_Tp)*, _Tp>::value>::type
605 __c11_atomic_init(volatile _Atomic(_Tp)* __a, _Tp __val) {
606 // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
610 volatile char* end = to + sizeof(_Tp);
617 template <typename _Tp>
618 static inline void __c11_atomic_init(_Atomic(_Tp)* __a, _Tp __val) {
634 template <typename _Tp>
635 static inline void __c11_atomic_store(volatile _Atomic(_Tp)* __a, _Tp __val,
641 template <typename _Tp>
642 static inline void __c11_atomic_store(_Atomic(_Tp)* __a, _Tp __val,
648 template <typename _Tp>
649 static inline _Tp __c11_atomic_load(volatile _Atomic(_Tp)* __a,
651 _Tp __ret;
657 template <typename _Tp>
658 static inline _Tp __c11_atomic_load(_Atomic(_Tp)* __a, memory_order __order) {
659 _Tp __ret;
665 template <typename _Tp>
666 static inline _Tp __c11_atomic_exchange(volatile _Atomic(_Tp)* __a,
667 _Tp __value, memory_order __order) {
668 _Tp __ret;
674 template <typename _Tp>
675 static inline _Tp __c11_atomic_exchange(_Atomic(_Tp)* __a, _Tp __value,
677 _Tp __ret;
683 template <typename _Tp>
685 volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value,
693 template <typename _Tp>
695 _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success,
703 template <typename _Tp>
705 volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value,
713 template <typename _Tp>
715 _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success,
723 template <typename _Tp>
726 template <typename _Tp>
727 struct __skip_amt<_Tp*> { enum {value = sizeof(_Tp)}; };
731 template <typename _Tp>
732 struct __skip_amt<_Tp[]> { };
733 template <typename _Tp, int n>
734 struct __skip_amt<_Tp[n]> { };
736 template <typename _Tp, typename _Td>
737 static inline _Tp __c11_atomic_fetch_add(volatile _Atomic(_Tp)* __a,
739 return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
743 template <typename _Tp, typename _Td>
744 static inline _Tp __c11_atomic_fetch_add(_Atomic(_Tp)* __a, _Td __delta,
746 return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
750 template <typename _Tp, typename _Td>
751 static inline _Tp __c11_atomic_fetch_sub(volatile _Atomic(_Tp)* __a,
753 return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
757 template <typename _Tp, typename _Td>
758 static inline _Tp __c11_atomic_fetch_sub(_Atomic(_Tp)* __a, _Td __delta,
760 return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
764 template <typename _Tp>
765 static inline _Tp __c11_atomic_fetch_and(volatile _Atomic(_Tp)* __a,
766 _Tp __pattern, memory_order __order) {
771 template <typename _Tp>
772 static inline _Tp __c11_atomic_fetch_and(_Atomic(_Tp)* __a,
773 _Tp __pattern, memory_order __order) {
778 template <typename _Tp>
779 static inline _Tp __c11_atomic_fetch_or(volatile _Atomic(_Tp)* __a,
780 _Tp __pattern, memory_order __order) {
785 template <typename _Tp>
786 static inline _Tp __c11_atomic_fetch_or(_Atomic(_Tp)* __a, _Tp __pattern,
792 template <typename _Tp>
793 static inline _Tp __c11_atomic_fetch_xor(volatile _Atomic(_Tp)* __a,
794 _Tp __pattern, memory_order __order) {
799 template <typename _Tp>
800 static inline _Tp __c11_atomic_fetch_xor(_Atomic(_Tp)* __a, _Tp __pattern,
808 template <class _Tp>
810 _Tp
811 kill_dependency(_Tp __y) _NOEXCEPT
818 template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::value>
821 mutable _Atomic(_Tp) __a_;
825 {return __c11_atomic_is_lock_free(sizeof(_Tp));}
828 {return __c11_atomic_is_lock_free(sizeof(_Tp));}
830 void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
833 void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
836 _Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
839 _Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
842 operator _Tp() const volatile _NOEXCEPT {return load();}
844 operator _Tp() const _NOEXCEPT {return load();}
846 _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
849 _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
852 bool compare_exchange_weak(_Tp& __e, _Tp __d,
856 bool compare_exchange_weak(_Tp& __e, _Tp __d,
860 bool compare_exchange_strong(_Tp& __e, _Tp __d,
864 bool compare_exchange_strong(_Tp& __e, _Tp __d,
868 bool compare_exchange_weak(_Tp& __e, _Tp __d,
872 bool compare_exchange_weak(_Tp& __e, _Tp __d,
876 bool compare_exchange_strong(_Tp& __e, _Tp __d,
880 bool compare_exchange_strong(_Tp& __e, _Tp __d,
892 _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}
907 template <class _Tp>
908 struct __atomic_base<_Tp, true>
909 : public __atomic_base<_Tp, false>
911 typedef __atomic_base<_Tp, false> __base;
915 _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
918 _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
921 _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
924 _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
927 _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
930 _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
933 _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
936 _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
939 _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
942 _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
945 _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
949 _Tp operator++(int) volatile _NOEXCEPT {return fetch_add(_Tp(1));}
951 _Tp operator++(int) _NOEXCEPT {return fetch_add(_Tp(1));}
953 _Tp operator--(int) volatile _NOEXCEPT {return fetch_sub(_Tp(1));}
955 _Tp operator--(int) _NOEXCEPT {return fetch_sub(_Tp(1));}
957 _Tp operator++() volatile _NOEXCEPT {return fetch_add(_Tp(1)) + _Tp(1);}
959 _Tp operator++() _NOEXCEPT {return fetch_add(_Tp(1)) + _Tp(1);}
961 _Tp operator--() volatile _NOEXCEPT {return fetch_sub(_Tp(1)) - _Tp(1);}
963 _Tp operator--() _NOEXCEPT {return fetch_sub(_Tp(1)) - _Tp(1);}
965 _Tp operator+=(_Tp __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
967 _Tp operator+=(_Tp __op) _NOEXCEPT {return fetch_add(__op) + __op;}
969 _Tp operator-=(_Tp __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
971 _Tp operator-=(_Tp __op) _NOEXCEPT {return fetch_sub(__op) - __op;}
973 _Tp operator&=(_Tp __op) volatile _NOEXCEPT {return fetch_and(__op) & __op;}
975 _Tp operator&=(_Tp __op) _NOEXCEPT {return fetch_and(__op) & __op;}
977 _Tp operator|=(_Tp __op) volatile _NOEXCEPT {return fetch_or(__op) | __op;}
979 _Tp operator|=(_Tp __op) _NOEXCEPT {return fetch_or(__op) | __op;}
981 _Tp operator^=(_Tp __op) volatile _NOEXCEPT {return fetch_xor(__op) ^ __op;}
983 _Tp operator^=(_Tp __op) _NOEXCEPT {return fetch_xor(__op) ^ __op;}
988 template <class _Tp>
990 : public __atomic_base<_Tp>
992 typedef __atomic_base<_Tp> __base;
996 _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
999 _Tp operator=(_Tp __d) volatile _NOEXCEPT
1002 _Tp operator=(_Tp __d) _NOEXCEPT
1008 template <class _Tp>
1009 struct atomic<_Tp*>
1010 : public __atomic_base<_Tp*>
1012 typedef __atomic_base<_Tp*> __base;
1016 _LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
1019 _Tp* operator=(_Tp* __d) volatile _NOEXCEPT
1022 _Tp* operator=(_Tp* __d) _NOEXCEPT
1026 _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst)
1030 _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
1033 _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst)
1037 _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
1041 _Tp* operator++(int) volatile _NOEXCEPT {return fetch_add(1);}
1043 _Tp* operator++(int) _NOEXCEPT {return fetch_add(1);}
1045 _Tp* operator--(int) volatile _NOEXCEPT {return fetch_sub(1);}
1047 _Tp* operator--(int) _NOEXCEPT {return fetch_sub(1);}
1049 _Tp* operator++() volatile _NOEXCEPT {return fetch_add(1) + 1;}
1051 _Tp* operator++() _NOEXCEPT {return fetch_add(1) + 1;}
1053 _Tp* operator--() volatile _NOEXCEPT {return fetch_sub(1) - 1;}
1055 _Tp* operator--() _NOEXCEPT {return fetch_sub(1) - 1;}
1057 _Tp* operator+=(ptrdiff_t __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
1059 _Tp* operator+=(ptrdiff_t __op) _NOEXCEPT {return fetch_add(__op) + __op;}
1061 _Tp* operator-=(ptrdiff_t __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
1063 _Tp* operator-=(ptrdiff_t __op) _NOEXCEPT {return fetch_sub(__op) - __op;}
1068 template <class _Tp>
1071 atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT
1076 template <class _Tp>
1079 atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
1086 template <class _Tp>
1089 atomic_init(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1094 template <class _Tp>
1097 atomic_init(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1104 template <class _Tp>
1107 atomic_store(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1112 template <class _Tp>
1115 atomic_store(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1122 template <class _Tp>
1125 atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1130 template <class _Tp>
1133 atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1140 template <class _Tp>
1142 _Tp
1143 atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT
1148 template <class _Tp>
1150 _Tp
1151 atomic_load(const atomic<_Tp>* __o) _NOEXCEPT
1158 template <class _Tp>
1160 _Tp
1161 atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
1166 template <class _Tp>
1168 _Tp
1169 atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
1176 template <class _Tp>
1178 _Tp
1179 atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1184 template <class _Tp>
1186 _Tp
1187 atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1194 template <class _Tp>
1196 _Tp
1197 atomic_exchange_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1202 template <class _Tp>
1204 _Tp
1205 atomic_exchange_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1212 template <class _Tp>
1215 atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1220 template <class _Tp>
1223 atomic_compare_exchange_weak(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1230 template <class _Tp>
1233 atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1238 template <class _Tp>
1241 atomic_compare_exchange_strong(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1248 template <class _Tp>
1251 atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e,
1252 _Tp __d,
1258 template <class _Tp>
1261 atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d,
1269 template <class _Tp>
1272 atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o,
1273 _Tp* __e, _Tp __d,
1279 template <class _Tp>
1282 atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, _Tp* __e,
1283 _Tp __d,
1291 template <class _Tp>
1295 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1296 _Tp
1298 atomic_fetch_add(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1303 template <class _Tp>
1307 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1308 _Tp
1310 atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1315 template <class _Tp>
1317 _Tp*
1318 atomic_fetch_add(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1323 template <class _Tp>
1325 _Tp*
1326 atomic_fetch_add(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1333 template <class _Tp>
1337 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1338 _Tp
1340 atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1345 template <class _Tp>
1349 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1350 _Tp
1352 atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1357 template <class _Tp>
1359 _Tp*
1360 atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op,
1366 template <class _Tp>
1368 _Tp*
1369 atomic_fetch_add_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT
1376 template <class _Tp>
1380 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1381 _Tp
1383 atomic_fetch_sub(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1388 template <class _Tp>
1392 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1393 _Tp
1395 atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1400 template <class _Tp>
1402 _Tp*
1403 atomic_fetch_sub(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1408 template <class _Tp>
1410 _Tp*
1411 atomic_fetch_sub(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1418 template <class _Tp>
1422 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1423 _Tp
1425 atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1430 template <class _Tp>
1434 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1435 _Tp
1437 atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1442 template <class _Tp>
1444 _Tp*
1445 atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op,
1451 template <class _Tp>
1453 _Tp*
1454 atomic_fetch_sub_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT
1461 template <class _Tp>
1465 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1466 _Tp
1468 atomic_fetch_and(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1473 template <class _Tp>
1477 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1478 _Tp
1480 atomic_fetch_and(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1487 template <class _Tp>
1491 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1492 _Tp
1494 atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1499 template <class _Tp>
1503 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1504 _Tp
1506 atomic_fetch_and_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1513 template <class _Tp>
1517 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1518 _Tp
1520 atomic_fetch_or(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1525 template <class _Tp>
1529 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1530 _Tp
1532 atomic_fetch_or(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1539 template <class _Tp>
1543 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1544 _Tp
1546 atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1551 template <class _Tp>
1555 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1556 _Tp
1558 atomic_fetch_or_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1565 template <class _Tp>
1569 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1570 _Tp
1572 atomic_fetch_xor(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1577 template <class _Tp>
1581 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1582 _Tp
1584 atomic_fetch_xor(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1591 template <class _Tp>
1595 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1596 _Tp
1598 atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1603 template <class _Tp>
1607 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1608 _Tp
1610 atomic_fetch_xor_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT