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