Lines Matching refs:_Tp
584 template <typename _Tp>
587 __gcc_atomic::__can_assign<volatile _Atomic(_Tp)*, _Tp>::value>::type
588 __c11_atomic_init(volatile _Atomic(_Tp)* __a, _Tp __val) {
592 template <typename _Tp>
595 !__gcc_atomic::__can_assign<volatile _Atomic(_Tp)*, _Tp>::value &&
596 __gcc_atomic::__can_assign< _Atomic(_Tp)*, _Tp>::value>::type
597 __c11_atomic_init(volatile _Atomic(_Tp)* __a, _Tp __val) {
598 // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
602 volatile char* end = to + sizeof(_Tp);
609 template <typename _Tp>
610 static inline void __c11_atomic_init(_Atomic(_Tp)* __a, _Tp __val) {
626 template <typename _Tp>
627 static inline void __c11_atomic_store(volatile _Atomic(_Tp)* __a, _Tp __val,
633 template <typename _Tp>
634 static inline void __c11_atomic_store(_Atomic(_Tp)* __a, _Tp __val,
640 template <typename _Tp>
641 static inline _Tp __c11_atomic_load(volatile _Atomic(_Tp)* __a,
643 _Tp __ret;
649 template <typename _Tp>
650 static inline _Tp __c11_atomic_load(_Atomic(_Tp)* __a, memory_order __order) {
651 _Tp __ret;
657 template <typename _Tp>
658 static inline _Tp __c11_atomic_exchange(volatile _Atomic(_Tp)* __a,
659 _Tp __value, memory_order __order) {
660 _Tp __ret;
666 template <typename _Tp>
667 static inline _Tp __c11_atomic_exchange(_Atomic(_Tp)* __a, _Tp __value,
669 _Tp __ret;
675 template <typename _Tp>
677 volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value,
685 template <typename _Tp>
687 _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success,
695 template <typename _Tp>
697 volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value,
705 template <typename _Tp>
707 _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success,
715 template <typename _Tp>
718 template <typename _Tp>
719 struct __skip_amt<_Tp*> { enum {value = sizeof(_Tp)}; };
723 template <typename _Tp>
724 struct __skip_amt<_Tp[]> { };
725 template <typename _Tp, int n>
726 struct __skip_amt<_Tp[n]> { };
728 template <typename _Tp, typename _Td>
729 static inline _Tp __c11_atomic_fetch_add(volatile _Atomic(_Tp)* __a,
731 return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
735 template <typename _Tp, typename _Td>
736 static inline _Tp __c11_atomic_fetch_add(_Atomic(_Tp)* __a, _Td __delta,
738 return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
742 template <typename _Tp, typename _Td>
743 static inline _Tp __c11_atomic_fetch_sub(volatile _Atomic(_Tp)* __a,
745 return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
749 template <typename _Tp, typename _Td>
750 static inline _Tp __c11_atomic_fetch_sub(_Atomic(_Tp)* __a, _Td __delta,
752 return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
756 template <typename _Tp>
757 static inline _Tp __c11_atomic_fetch_and(volatile _Atomic(_Tp)* __a,
758 _Tp __pattern, memory_order __order) {
763 template <typename _Tp>
764 static inline _Tp __c11_atomic_fetch_and(_Atomic(_Tp)* __a,
765 _Tp __pattern, memory_order __order) {
770 template <typename _Tp>
771 static inline _Tp __c11_atomic_fetch_or(volatile _Atomic(_Tp)* __a,
772 _Tp __pattern, memory_order __order) {
777 template <typename _Tp>
778 static inline _Tp __c11_atomic_fetch_or(_Atomic(_Tp)* __a, _Tp __pattern,
784 template <typename _Tp>
785 static inline _Tp __c11_atomic_fetch_xor(volatile _Atomic(_Tp)* __a,
786 _Tp __pattern, memory_order __order) {
791 template <typename _Tp>
792 static inline _Tp __c11_atomic_fetch_xor(_Atomic(_Tp)* __a, _Tp __pattern,
799 template <class _Tp>
801 _Tp
802 kill_dependency(_Tp __y) _NOEXCEPT
809 template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::value>
812 mutable _Atomic(_Tp) __a_;
816 {return __c11_atomic_is_lock_free(sizeof(_Tp));}
819 {return __c11_atomic_is_lock_free(sizeof(_Tp));}
821 void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
824 void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
827 _Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
830 _Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
833 operator _Tp() const volatile _NOEXCEPT {return load();}
835 operator _Tp() const _NOEXCEPT {return load();}
837 _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
840 _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
843 bool compare_exchange_weak(_Tp& __e, _Tp __d,
847 bool compare_exchange_weak(_Tp& __e, _Tp __d,
851 bool compare_exchange_strong(_Tp& __e, _Tp __d,
855 bool compare_exchange_strong(_Tp& __e, _Tp __d,
859 bool compare_exchange_weak(_Tp& __e, _Tp __d,
863 bool compare_exchange_weak(_Tp& __e, _Tp __d,
867 bool compare_exchange_strong(_Tp& __e, _Tp __d,
871 bool compare_exchange_strong(_Tp& __e, _Tp __d,
883 _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}
898 template <class _Tp>
899 struct __atomic_base<_Tp, true>
900 : public __atomic_base<_Tp, false>
902 typedef __atomic_base<_Tp, false> __base;
906 _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
909 _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
912 _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
915 _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
918 _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
921 _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
924 _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
927 _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
930 _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
933 _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
936 _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
940 _Tp operator++(int) volatile _NOEXCEPT {return fetch_add(_Tp(1));}
942 _Tp operator++(int) _NOEXCEPT {return fetch_add(_Tp(1));}
944 _Tp operator--(int) volatile _NOEXCEPT {return fetch_sub(_Tp(1));}
946 _Tp operator--(int) _NOEXCEPT {return fetch_sub(_Tp(1));}
948 _Tp operator++() volatile _NOEXCEPT {return fetch_add(_Tp(1)) + _Tp(1);}
950 _Tp operator++() _NOEXCEPT {return fetch_add(_Tp(1)) + _Tp(1);}
952 _Tp operator--() volatile _NOEXCEPT {return fetch_sub(_Tp(1)) - _Tp(1);}
954 _Tp operator--() _NOEXCEPT {return fetch_sub(_Tp(1)) - _Tp(1);}
956 _Tp operator+=(_Tp __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
958 _Tp operator+=(_Tp __op) _NOEXCEPT {return fetch_add(__op) + __op;}
960 _Tp operator-=(_Tp __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
962 _Tp operator-=(_Tp __op) _NOEXCEPT {return fetch_sub(__op) - __op;}
964 _Tp operator&=(_Tp __op) volatile _NOEXCEPT {return fetch_and(__op) & __op;}
966 _Tp operator&=(_Tp __op) _NOEXCEPT {return fetch_and(__op) & __op;}
968 _Tp operator|=(_Tp __op) volatile _NOEXCEPT {return fetch_or(__op) | __op;}
970 _Tp operator|=(_Tp __op) _NOEXCEPT {return fetch_or(__op) | __op;}
972 _Tp operator^=(_Tp __op) volatile _NOEXCEPT {return fetch_xor(__op) ^ __op;}
974 _Tp operator^=(_Tp __op) _NOEXCEPT {return fetch_xor(__op) ^ __op;}
979 template <class _Tp>
981 : public __atomic_base<_Tp>
983 typedef __atomic_base<_Tp> __base;
987 _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
990 _Tp operator=(_Tp __d) volatile _NOEXCEPT
993 _Tp operator=(_Tp __d) _NOEXCEPT
999 template <class _Tp>
1000 struct atomic<_Tp*>
1001 : public __atomic_base<_Tp*>
1003 typedef __atomic_base<_Tp*> __base;
1007 _LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
1010 _Tp* operator=(_Tp* __d) volatile _NOEXCEPT
1013 _Tp* operator=(_Tp* __d) _NOEXCEPT
1017 _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst)
1021 _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
1024 _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst)
1028 _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
1032 _Tp* operator++(int) volatile _NOEXCEPT {return fetch_add(1);}
1034 _Tp* operator++(int) _NOEXCEPT {return fetch_add(1);}
1036 _Tp* operator--(int) volatile _NOEXCEPT {return fetch_sub(1);}
1038 _Tp* operator--(int) _NOEXCEPT {return fetch_sub(1);}
1040 _Tp* operator++() volatile _NOEXCEPT {return fetch_add(1) + 1;}
1042 _Tp* operator++() _NOEXCEPT {return fetch_add(1) + 1;}
1044 _Tp* operator--() volatile _NOEXCEPT {return fetch_sub(1) - 1;}
1046 _Tp* operator--() _NOEXCEPT {return fetch_sub(1) - 1;}
1048 _Tp* operator+=(ptrdiff_t __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
1050 _Tp* operator+=(ptrdiff_t __op) _NOEXCEPT {return fetch_add(__op) + __op;}
1052 _Tp* operator-=(ptrdiff_t __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
1054 _Tp* operator-=(ptrdiff_t __op) _NOEXCEPT {return fetch_sub(__op) - __op;}
1059 template <class _Tp>
1062 atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT
1067 template <class _Tp>
1070 atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
1077 template <class _Tp>
1080 atomic_init(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1085 template <class _Tp>
1088 atomic_init(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1095 template <class _Tp>
1098 atomic_store(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1103 template <class _Tp>
1106 atomic_store(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1113 template <class _Tp>
1116 atomic_store_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1121 template <class _Tp>
1124 atomic_store_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1131 template <class _Tp>
1133 _Tp
1134 atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT
1139 template <class _Tp>
1141 _Tp
1142 atomic_load(const atomic<_Tp>* __o) _NOEXCEPT
1149 template <class _Tp>
1151 _Tp
1152 atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
1157 template <class _Tp>
1159 _Tp
1160 atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
1167 template <class _Tp>
1169 _Tp
1170 atomic_exchange(volatile atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1175 template <class _Tp>
1177 _Tp
1178 atomic_exchange(atomic<_Tp>* __o, _Tp __d) _NOEXCEPT
1185 template <class _Tp>
1187 _Tp
1188 atomic_exchange_explicit(volatile atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1193 template <class _Tp>
1195 _Tp
1196 atomic_exchange_explicit(atomic<_Tp>* __o, _Tp __d, memory_order __m) _NOEXCEPT
1203 template <class _Tp>
1206 atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1211 template <class _Tp>
1214 atomic_compare_exchange_weak(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1221 template <class _Tp>
1224 atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1229 template <class _Tp>
1232 atomic_compare_exchange_strong(atomic<_Tp>* __o, _Tp* __e, _Tp __d) _NOEXCEPT
1239 template <class _Tp>
1242 atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, _Tp* __e,
1243 _Tp __d,
1249 template <class _Tp>
1252 atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, _Tp* __e, _Tp __d,
1260 template <class _Tp>
1263 atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o,
1264 _Tp* __e, _Tp __d,
1270 template <class _Tp>
1273 atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, _Tp* __e,
1274 _Tp __d,
1282 template <class _Tp>
1286 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1287 _Tp
1289 atomic_fetch_add(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1294 template <class _Tp>
1298 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1299 _Tp
1301 atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1306 template <class _Tp>
1308 _Tp*
1309 atomic_fetch_add(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1314 template <class _Tp>
1316 _Tp*
1317 atomic_fetch_add(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1324 template <class _Tp>
1328 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1329 _Tp
1331 atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1336 template <class _Tp>
1340 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1341 _Tp
1343 atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1348 template <class _Tp>
1350 _Tp*
1351 atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op,
1357 template <class _Tp>
1359 _Tp*
1360 atomic_fetch_add_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT
1367 template <class _Tp>
1371 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1372 _Tp
1374 atomic_fetch_sub(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1379 template <class _Tp>
1383 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1384 _Tp
1386 atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1391 template <class _Tp>
1393 _Tp*
1394 atomic_fetch_sub(volatile atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1399 template <class _Tp>
1401 _Tp*
1402 atomic_fetch_sub(atomic<_Tp*>* __o, ptrdiff_t __op) _NOEXCEPT
1409 template <class _Tp>
1413 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1414 _Tp
1416 atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1421 template <class _Tp>
1425 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1426 _Tp
1428 atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1433 template <class _Tp>
1435 _Tp*
1436 atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, ptrdiff_t __op,
1442 template <class _Tp>
1444 _Tp*
1445 atomic_fetch_sub_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) _NOEXCEPT
1452 template <class _Tp>
1456 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1457 _Tp
1459 atomic_fetch_and(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1464 template <class _Tp>
1468 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1469 _Tp
1471 atomic_fetch_and(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1478 template <class _Tp>
1482 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1483 _Tp
1485 atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1490 template <class _Tp>
1494 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1495 _Tp
1497 atomic_fetch_and_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1504 template <class _Tp>
1508 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1509 _Tp
1511 atomic_fetch_or(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1516 template <class _Tp>
1520 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1521 _Tp
1523 atomic_fetch_or(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1530 template <class _Tp>
1534 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1535 _Tp
1537 atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1542 template <class _Tp>
1546 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1547 _Tp
1549 atomic_fetch_or_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1556 template <class _Tp>
1560 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1561 _Tp
1563 atomic_fetch_xor(volatile atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1568 template <class _Tp>
1572 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1573 _Tp
1575 atomic_fetch_xor(atomic<_Tp>* __o, _Tp __op) _NOEXCEPT
1582 template <class _Tp>
1586 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1587 _Tp
1589 atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT
1594 template <class _Tp>
1598 is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
1599 _Tp
1601 atomic_fetch_xor_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) _NOEXCEPT