Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19112,6 +19112,8 @@
template<size_t UBytes, class UAbi>
constexpr explicit basic_simd_mask(const basic_simd_mask<UBytes, UAbi>&) noexcept;
template<class G> constexpr explicit basic_simd_mask(G&& gen) noexcept;
constexpr basic_simd_mask(const bitset<size()>& 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;
Expand All @@ -19126,6 +19128,10 @@
template<class U, class A>
constexpr explicit(sizeof(U) != Bytes) operator basic_simd<U, A>() const noexcept;

// \ref{simd.mask.namedconv}, \tcode{basic_simd_mask} named type convertors
constexpr bitset<size()> 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;
Expand Down Expand Up @@ -19258,6 +19264,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<size()>& 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}
Expand Down Expand Up @@ -19316,6 +19347,43 @@
\tcode{static_cast<U>(operator[]($i$))}.
\end{itemdescr}

\rSec3[simd.mask.namedconv]{\tcode{basic_simd_mask} named conversion operators}

\begin{itemdecl}
constexpr bitset<size()> to_bitset() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
A \tcode{bitset<size()>} 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() <= $N$} is \tcode{true}, 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}
Expand Down
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,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}
Expand Down