|
19095 | 19095 | template<size_t UBytes, class UAbi>
|
19096 | 19096 | constexpr explicit basic_simd_mask(const basic_simd_mask<UBytes, UAbi>&) noexcept;
|
19097 | 19097 | template<class G> constexpr explicit basic_simd_mask(G&& gen) noexcept;
|
| 19098 | + constexpr basic_simd_mask(const bitset<size()>& b) noexcept; |
| 19099 | + constexpr explicit basic_simd_mask(@\libconcept{unsigned_integral}@ auto val) noexcept; |
19098 | 19100 |
|
19099 | 19101 | // \ref{simd.mask.subscr}, \tcode{basic_simd_mask} subscript operators
|
19100 | 19102 | constexpr value_type operator[](@\exposid{simd-size-type}@) const;
|
|
19109 | 19111 | template<class U, class A>
|
19110 | 19112 | constexpr explicit(sizeof(U) != Bytes) operator basic_simd<U, A>() const noexcept;
|
19111 | 19113 |
|
| 19114 | + // \ref{simd.mask.namedconv}, \tcode{basic_simd_mask} named type convertors |
| 19115 | + constexpr bitset<size()> to_bitset() const noexcept; |
| 19116 | + constexpr unsigned long long to_ullong() const; |
| 19117 | + |
19112 | 19118 | // \ref{simd.mask.binary}, \tcode{basic_simd_mask} binary operators
|
19113 | 19119 | friend constexpr basic_simd_mask
|
19114 | 19120 | operator&&(const basic_simd_mask&, const basic_simd_mask&) noexcept;
|
|
19241 | 19247 | \tcode{gen} is invoked exactly once for each $i$, in increasing order of $i$.
|
19242 | 19248 | \end{itemdescr}
|
19243 | 19249 |
|
| 19250 | +\begin{itemdecl} |
| 19251 | +constexpr basic_simd_mask(const bitset<size()>& b) noexcept; |
| 19252 | +\end{itemdecl} |
| 19253 | + |
| 19254 | +\begin{itemdescr} |
| 19255 | +\pnum |
| 19256 | +\effects |
| 19257 | +Initializes the $i^\text{th}$ element with \tcode{b[$i$]} for all $i$ in the |
| 19258 | +range \range{0}{size()}. |
| 19259 | +\end{itemdescr} |
| 19260 | + |
| 19261 | +\begin{itemdecl} |
| 19262 | +constexpr explicit basic_simd_mask(@\libconcept{unsigned_integral}@ auto val) noexcept; |
| 19263 | +\end{itemdecl} |
| 19264 | + |
| 19265 | +\begin{itemdescr} |
| 19266 | +\pnum |
| 19267 | +\effects |
| 19268 | +Initializes the first $M$ elements to the corresponding bit values in |
| 19269 | +\tcode{val}, where $M$ is the smaller of \tcode{size()} and the number of bits in |
| 19270 | +the value representation \iref{basic.types.general} of the type of \tcode{val}. If |
| 19271 | +$M$ is less than \tcode{size()}, the remaining elements are initialized to |
| 19272 | +zero. |
| 19273 | +\end{itemdescr} |
| 19274 | + |
19244 | 19275 | \rSec3[simd.mask.subscr]{\tcode{basic_simd_mask} subscript operator}
|
19245 | 19276 |
|
19246 | 19277 | \begin{itemdecl}
|
|
19299 | 19330 | \tcode{static_cast<U>(operator[]($i$))}.
|
19300 | 19331 | \end{itemdescr}
|
19301 | 19332 |
|
| 19333 | +\rSec3[simd.mask.namedconv]{\tcode{basic_simd_mask} named conversion operators} |
| 19334 | + |
| 19335 | +\begin{itemdecl} |
| 19336 | +constexpr bitset<size()> to_bitset() const noexcept; |
| 19337 | +\end{itemdecl} |
| 19338 | + |
| 19339 | +\begin{itemdescr} |
| 19340 | +\pnum |
| 19341 | +\returns |
| 19342 | +A \tcode{bitset<size()>} object where the $i^\text{th}$ element is initialized to |
| 19343 | +\tcode{operator[]($i$)} for all $i$ in the range \range{0}{size()}. |
| 19344 | +\end{itemdescr} |
| 19345 | + |
| 19346 | +\begin{itemdecl} |
| 19347 | +constexpr unsigned long long to_ullong() const; |
| 19348 | +\end{itemdecl} |
| 19349 | + |
| 19350 | +\begin{itemdescr} |
| 19351 | +\pnum |
| 19352 | +Let $N$ be the width of \tcode{unsigned long long}. |
| 19353 | + |
| 19354 | +\pnum |
| 19355 | +\expects |
| 19356 | +\begin{itemize} |
| 19357 | +\item \tcode{size() <= $N$} is \tcode{true}, or |
| 19358 | +\item for all $i$ in the range \range{$N$}{size()}, \tcode{operator[]($i$)} returns \tcode{false}. |
| 19359 | +\end{itemize} |
| 19360 | + |
| 19361 | +\pnum |
| 19362 | +\returns |
| 19363 | +The integral value corresponding to the bits in \tcode{*this}. |
| 19364 | + |
| 19365 | +\pnum |
| 19366 | +\throws |
| 19367 | +Nothing. |
| 19368 | +\end{itemdescr} |
| 19369 | + |
19302 | 19370 | \rSec2[simd.mask.nonmembers]{Non-member operations}
|
19303 | 19371 |
|
19304 | 19372 | \rSec3[simd.mask.binary]{\tcode{basic_simd_mask} binary operators}
|
|
0 commit comments