@@ -530,7 +530,7 @@ struct AtomicWithAdd : public AtomicBaseInt<T, A> {
530
530
T operator ++() volatile
531
531
{
532
532
A d = static_cast <A>(sizeof (StrideT));
533
- return T (core_util_atomic_fetch_add (&this ->u , d) + d );
533
+ return T (core_util_atomic_incr (&this ->u , d));
534
534
}
535
535
T operator ++(int ) volatile
536
536
{
@@ -540,7 +540,7 @@ struct AtomicWithAdd : public AtomicBaseInt<T, A> {
540
540
T operator --() volatile
541
541
{
542
542
A d = static_cast <A>(sizeof (StrideT));
543
- return T (core_util_atomic_fetch_sub (&this ->u , d) - d );
543
+ return T (core_util_atomic_decr (&this ->u , d));
544
544
}
545
545
T operator --(int ) volatile
546
546
{
@@ -560,7 +560,7 @@ struct AtomicWithAdd : public AtomicBaseInt<T, A> {
560
560
T operator +=(DiffT arg) volatile
561
561
{
562
562
A d = static_cast <A>(arg * sizeof (StrideT));
563
- return T (core_util_atomic_fetch_add (&this ->u , d) + d );
563
+ return T (core_util_atomic_incr (&this ->u , d));
564
564
}
565
565
T fetch_sub (DiffT arg) volatile
566
566
{
@@ -575,7 +575,7 @@ struct AtomicWithAdd : public AtomicBaseInt<T, A> {
575
575
T operator -=(DiffT arg) volatile
576
576
{
577
577
A d = static_cast <A>(arg * sizeof (StrideT));
578
- return T (core_util_atomic_fetch_sub (&this ->u , d) - d );
578
+ return T (core_util_atomic_decr (&this ->u , d));
579
579
}
580
580
};
581
581
@@ -602,7 +602,7 @@ struct AtomicWithBitwise : public AtomicWithAdd<T, A> {
602
602
T operator &=(T arg) volatile
603
603
{
604
604
A d = static_cast <A>(arg);
605
- return static_cast <T>(core_util_atomic_fetch_and (&this ->u , d) & d );
605
+ return static_cast <T>(core_util_atomic_and_fetch (&this ->u , d));
606
606
}
607
607
T fetch_or (T arg) volatile
608
608
{
@@ -617,7 +617,7 @@ struct AtomicWithBitwise : public AtomicWithAdd<T, A> {
617
617
T operator |=(T arg) volatile
618
618
{
619
619
A d = static_cast <A>(arg);
620
- return static_cast <T>(core_util_atomic_fetch_or (&this ->u , d) | d );
620
+ return static_cast <T>(core_util_atomic_or_fetch (&this ->u , d));
621
621
}
622
622
T fetch_xor (T arg) volatile
623
623
{
@@ -632,7 +632,7 @@ struct AtomicWithBitwise : public AtomicWithAdd<T, A> {
632
632
T operator ^=(T arg) volatile
633
633
{
634
634
A d = static_cast <A>(arg);
635
- return static_cast <T>(core_util_atomic_fetch_xor (&this ->u , d) ^ d );
635
+ return static_cast <T>(core_util_atomic_xor_fetch (&this ->u , d));
636
636
}
637
637
};
638
638
0 commit comments