|
3773 | 3773 | constexpr value_type fetch_sub(@\placeholdernc{floating-point-type}@,
|
3774 | 3774 | memory_order = memory_order::seq_cst) const noexcept;
|
3775 | 3775 |
|
| 3776 | + constexpr @\placeholdernc{floating-point-type}@ fetch_max(@\placeholdernc{floating-point-type}@, |
| 3777 | + memory_order = memory_order::seq_cst) const noexcept; |
| 3778 | + constexpr @\placeholdernc{floating-point-type}@ fetch_min(@\placeholdernc{floating-point-type}@, |
| 3779 | + memory_order = memory_order::seq_cst) const noexcept; |
| 3780 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fmaximum(@\placeholdernc{floating-point-type}@, |
| 3781 | + memory_order = memory_order::seq_cst) const noexcept; |
| 3782 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fminimum(@\placeholdernc{floating-point-type}@, |
| 3783 | + memory_order = memory_order::seq_cst) const noexcept; |
| 3784 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fmaximum_num(@\placeholdernc{floating-point}@, |
| 3785 | + memory_order = memory_order::seq_cst) const noexcept; |
| 3786 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fminimum_num(@\placeholdernc{floating-point-type}@, |
| 3787 | + memory_order = memory_order::seq_cst) const noexcept; |
| 3788 | + |
3776 | 3789 | constexpr value_type operator+=(value_type) const noexcept;
|
3777 | 3790 | constexpr value_type operator-=(value_type) const noexcept;
|
3778 | 3791 |
|
|
3792 | 3805 | \pnum
|
3793 | 3806 | The following operations perform arithmetic computations.
|
3794 | 3807 | The correspondence among key, operator, and computation is specified
|
3795 |
| -in \tref{atomic.types.int.comp}. |
| 3808 | +in \tref{atomic.types.int.comp}, |
| 3809 | +except for the keys |
| 3810 | +\tcode{max}, |
| 3811 | +\tcode{min}, |
| 3812 | +\tcode{fmaximum}, |
| 3813 | +\tcode{fminimum}, |
| 3814 | +\tcode{fmaximum_num}, and |
| 3815 | +\tcode{fminimum_num}, |
| 3816 | +which are specified below. |
3796 | 3817 |
|
3797 | 3818 | \indexlibrarymember{fetch_add}{atomic_ref<\placeholder{floating-point-type}>}%
|
3798 | 3819 | \indexlibrarymember{fetch_sub}{atomic_ref<\placeholder{floating-point-type}>}%
|
|
3830 | 3851 | The floating-point environment\iref{cfenv}
|
3831 | 3852 | for atomic arithmetic operations on \tcode{\placeholder{floating-\newline point-type}}
|
3832 | 3853 | may be different than the calling thread's floating-point environment.
|
| 3854 | + |
| 3855 | +\pnum |
| 3856 | +\begin{itemize} |
| 3857 | +\item |
| 3858 | +For \tcode{fetch_fmaximum} and \tcode{fetch_fminimum}, |
| 3859 | +the maximum and minimum computation is performed |
| 3860 | +as if by \tcode{fmaximum} and \tcode{fminimum}, respectively, |
| 3861 | +with \tcode{*ptr} and the first parameter as the arguments. |
| 3862 | +\item |
| 3863 | +For \tcode{fetch_fmaximum_num} and \tcode{fetch_fminimum_num}, |
| 3864 | +the maximum and minimum computation is performed |
| 3865 | +as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively, |
| 3866 | +with \tcode{*ptr} and the first parameter as the arguments. |
| 3867 | +\item |
| 3868 | +For \tcode{fetch_max} and \tcode{fetch_min}, |
| 3869 | +the maximum and minimum computation is performed |
| 3870 | +as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively, |
| 3871 | +with \tcode{*ptr} and the first parameter as the arguments, except that: |
| 3872 | +\begin{itemize} |
| 3873 | +\item |
| 3874 | +If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}. |
| 3875 | +\item |
| 3876 | +If exactly one argument is a NaN, |
| 3877 | +either the other argument or an unspecified NaN value is stored at \tcode{*ptr}; |
| 3878 | +it is unspecified which. |
| 3879 | +\item |
| 3880 | +If the arguments are differently signed zeros, |
| 3881 | +which of these values is stored at \tcode{*ptr} is unspecified. |
| 3882 | +\end{itemize} |
| 3883 | +\end{itemize} |
| 3884 | + |
| 3885 | +\pnum |
| 3886 | +\recommended |
| 3887 | +The implementation of \tcode{fetch_max} and \tcode{fetch_min} |
| 3888 | +should treat negative zero as smaller than positive zero. |
3833 | 3889 | \end{itemdescr}
|
3834 | 3890 |
|
3835 | 3891 | \indexlibrarymember{operator+=}{atomic_ref<\placeholder{floating-point-type}>}%
|
|
4965 | 5021 | memory_order = memory_order::seq_cst) volatile noexcept;
|
4966 | 5022 | constexpr @\placeholdernc{floating-point-type}@ fetch_sub(@\placeholdernc{floating-point-type}@,
|
4967 | 5023 | memory_order = memory_order::seq_cst) noexcept;
|
| 5024 | + @\placeholdernc{floating-point-type}@ fetch_max(@\placeholdernc{floating-point-type}@, |
| 5025 | + memory_order = memory_order::seq_cst) volatile noexcept; |
| 5026 | + constexpr @\placeholdernc{floating-point-type}@ fetch_max(@\placeholdernc{floating-point-type}@, |
| 5027 | + memory_order = memory_order::seq_cst) noexcept; |
| 5028 | + @\placeholdernc{floating-point-type}@ fetch_min(@\placeholdernc{floating-point-type}@, |
| 5029 | + memory_order = memory_order::seq_cst) volatile noexcept; |
| 5030 | + constexpr @\placeholdernc{floating-poin-type}@t fetch_min(@\placeholdernc{floating-point-type}@, |
| 5031 | + memory_order = memory_order::seq_cst) noexcept; |
| 5032 | + @\placeholdernc{floating-point-type}@ fetch_fmaximum(@\placeholdernc{floating-point-type}@, |
| 5033 | + memory_order = memory_order::seq_cst) volatile noexcept; |
| 5034 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fmaximum(@\placeholdernc{floating-point-type}@, |
| 5035 | + memory_order = memory_order::seq_cst) noexcept; |
| 5036 | + @\placeholdernc{floating-point-type}@ fetch_fminimum(@\placeholdernc{floating-point-type}@, |
| 5037 | + memory_order = memory_order::seq_cst) volatile noexcept; |
| 5038 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fminimum(@\placeholdernc{floating-point-type}@, |
| 5039 | + memory_order = memory_order::seq_cst) noexcept; |
| 5040 | + @\placeholdernc{floating-point-type}@ fetch_fmaximum_num(@\placeholdernc{floating-point-type}@, |
| 5041 | + memory_order = memory_order::seq_cst) volatile noexcept; |
| 5042 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fmaximum_num(@\placeholdernc{floating-point-type}@, |
| 5043 | + memory_order = memory_order::seq_cst) noexcept; |
| 5044 | + @\placeholdernc{floating-point-type}@ fetch_fminimum_num(@\placeholdernc{floating-point-type}@, |
| 5045 | + memory_order = memory_order::seq_cst) volatile noexcept; |
| 5046 | + constexpr @\placeholdernc{floating-point-type}@ fetch_fminimum_num(f@\placeholdernc{loating-point-type}@, |
| 5047 | + memory_order = memory_order::seq_cst) noexcept; |
4968 | 5048 |
|
4969 | 5049 | @\placeholdernc{floating-point-type}@ operator+=(@\placeholder{floating-point-type}@) volatile noexcept;
|
4970 | 5050 | constexpr @\placeholdernc{floating-point-type}@ operator+=(@\placeholder{floating-point-type}@) noexcept;
|
|
4994 | 5074 | \pnum
|
4995 | 5075 | The following operations perform arithmetic addition and subtraction computations.
|
4996 | 5076 | The correspondence among key, operator, and computation is specified
|
4997 |
| -in \tref{atomic.types.int.comp}. |
| 5077 | +in \tref{atomic.types.int.comp}, |
| 5078 | +except for the keys |
| 5079 | +\tcode{max}, |
| 5080 | +\tcode{min}, |
| 5081 | +\tcode{fmaximum}, |
| 5082 | +\tcode{fminimum}, |
| 5083 | +\tcode{fmaximum_num}, and |
| 5084 | +\tcode{fminimum_num}, |
| 5085 | +which are specified below. |
4998 | 5086 |
|
4999 | 5087 | \indexlibraryglobal{atomic_fetch_add}%
|
5000 | 5088 | \indexlibraryglobal{atomic_fetch_sub}%
|
|
5035 | 5123 | The floating-point environment\iref{cfenv} for atomic arithmetic operations
|
5036 | 5124 | on \tcode{\placeholder{floating-point-type}} may be different than the
|
5037 | 5125 | calling thread's floating-point environment.
|
| 5126 | + |
| 5127 | +\pnum |
| 5128 | +\begin{itemize} |
| 5129 | +\item |
| 5130 | +For \tcode{fetch_fmaximum} and \tcode{fetch_fminimum}, |
| 5131 | +the maximum and minimum computation is performed |
| 5132 | +as if by \tcode{fmaximum} and \tcode{fminimum}, respectively, |
| 5133 | +with the value pointed to by \tcode{this} and the first parameter |
| 5134 | +as the arguments. |
| 5135 | +\item |
| 5136 | +For \tcode{fetch_fmaximum}_num and \tcode{fetch_fminimum_num}, |
| 5137 | +the maximum and minimum computation is performed |
| 5138 | +as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively, |
| 5139 | +with the value pointed to by \tcode{this} and the first parameter |
| 5140 | +as the arguments. |
| 5141 | +\item |
| 5142 | +For \tcode{fetch_max} and \tcode{fetch_min}, |
| 5143 | +the maximum and minimum computation is performed |
| 5144 | +as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively, |
| 5145 | +with the value pointed to by \tcode{this} and the first parameter |
| 5146 | +as the arguments, except that: |
| 5147 | +\begin{itemize} |
| 5148 | +\item |
| 5149 | +If both arguments are NaN, |
| 5150 | +an unspecified NaN value replaces the value pointed to by \tcode{this}. |
| 5151 | +\item |
| 5152 | +If exactly one argument is a NaN, |
| 5153 | +either the other argument or an unspecified NaN value |
| 5154 | +replaces the value pointed to by \tcode{this}; it is unspecified which. |
| 5155 | +\item |
| 5156 | +If the arguments are differently signed zeros, |
| 5157 | +which of these values replaces the value pointed to by this is unspecified. |
| 5158 | +\end{itemize} |
| 5159 | +\end{itemize} |
| 5160 | + |
| 5161 | +\pnum |
| 5162 | +\recommended |
| 5163 | +The implementation of \tcode{fetch_max} and \tcode{fetch_min} |
| 5164 | +should treat negative zero as smaller than positive zero. |
5038 | 5165 | \end{itemdescr}
|
5039 | 5166 |
|
5040 | 5167 | \indexlibrarymember{operator+=}{atomic<T*>}%
|
|
0 commit comments