diff --git a/source/numerics.tex b/source/numerics.tex index 529ed10969..210d21a2d9 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -19095,6 +19095,8 @@ template constexpr explicit basic_simd_mask(const basic_simd_mask&) noexcept; template constexpr explicit basic_simd_mask(G&& gen) noexcept; + constexpr basic_simd_mask(const bitset& b) noexcept; + constexpr explicit basic_simd_mask(@\libconcept{unsigned_integral}@ auto val) noexcept; // \ref{simd.mask.subscr}, \tcode{basic_simd_mask} subscript operators constexpr value_type operator[](@\exposid{simd-size-type}@) const; @@ -19109,6 +19111,10 @@ template constexpr explicit(sizeof(U) != Bytes) operator basic_simd() const noexcept; + // \ref{simd.mask.namedconv}, \tcode{basic_simd_mask} named type convertors + constexpr bitset to_bitset() const noexcept; + constexpr unsigned long long to_ullong() const; + // \ref{simd.mask.binary}, \tcode{basic_simd_mask} binary operators friend constexpr basic_simd_mask operator&&(const basic_simd_mask&, const basic_simd_mask&) noexcept; @@ -19241,6 +19247,31 @@ \tcode{gen} is invoked exactly once for each $i$, in increasing order of $i$. \end{itemdescr} +\begin{itemdecl} +constexpr basic_simd_mask(const bitset& b) noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Initializes the $i^\text{th}$ element with \tcode{b[$i$]} for all $i$ in the +range \range{0}{size()}. +\end{itemdescr} + +\begin{itemdecl} +constexpr explicit basic_simd_mask(@\libconcept{unsigned_integral}@ auto val) noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Initializes the first $M$ elements to the corresponding bit values in +\tcode{val}, where $M$ is the smaller of \tcode{size()} and the number of bits in +the value representation\iref{basic.types.general} of the type of \tcode{val}. If +$M$ is less than \tcode{size()}, the remaining elements are initialized to +zero. +\end{itemdescr} + \rSec3[simd.mask.subscr]{\tcode{basic_simd_mask} subscript operator} \begin{itemdecl} @@ -19299,6 +19330,43 @@ \tcode{static_cast(operator[]($i$))}. \end{itemdescr} +\rSec3[simd.mask.namedconv]{\tcode{basic_simd_mask} named conversion operators} + +\begin{itemdecl} +constexpr bitset to_bitset() const noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +A \tcode{bitset} object where the $i^\text{th}$ element is initialized to +\tcode{operator[]($i$)} for all $i$ in the range \range{0}{size()}. +\end{itemdescr} + +\begin{itemdecl} +constexpr unsigned long long to_ullong() const; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let $N$ be the width of \tcode{unsigned long long}. + +\pnum +\expects +\begin{itemize} +\item \tcode{size()} $\le N$, or +\item for all $i$ in the range \range{$N$}{size()}, \tcode{operator[]($i$)} returns \tcode{false}. +\end{itemize} + +\pnum +\returns +The integral value corresponding to the bits in \tcode{*this}. + +\pnum +\throws +Nothing. +\end{itemdescr} + \rSec2[simd.mask.nonmembers]{Non-member operations} \rSec3[simd.mask.binary]{\tcode{basic_simd_mask} binary operators} diff --git a/source/support.tex b/source/support.tex index 95d674aafb..1486b6f39e 100644 --- a/source/support.tex +++ b/source/support.tex @@ -805,7 +805,7 @@ #define @\defnlibxname{cpp_lib_shared_ptr_weak_type}@ 201606L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_shared_timed_mutex}@ 201402L // also in \libheader{shared_mutex} #define @\defnlibxname{cpp_lib_shift}@ 202202L // also in \libheader{algorithm} -#define @\defnlibxname{cpp_lib_simd}@ 202502L // also in \libheader{simd} +#define @\defnlibxname{cpp_lib_simd}@ 202506L // also in \libheader{simd} #define @\defnlibxname{cpp_lib_simd_complex}@ 202502L // also in \libheader{simd} #define @\defnlibxname{cpp_lib_smart_ptr_for_overwrite}@ 202002L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_smart_ptr_owner_equality}@ 202306L // also in \libheader{memory}