Skip to content

Commit 103af7a

Browse files
authored
Merge 2025-02 LWG Motion 11
P3430R3 simd issues: explicit, unsequenced, identity-element position, and members of disabled simd
2 parents 53fb302 + 0570631 commit 103af7a

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

source/numerics.tex

+23-24
Original file line numberDiff line numberDiff line change
@@ -17204,7 +17204,7 @@
1720417204
constexpr basic_simd() noexcept = default;
1720517205

1720617206
// \ref{simd.ctor}, \tcode{basic_simd} constructors
17207-
template<class U> constexpr basic_simd(U&& value) noexcept;
17207+
template<class U> constexpr explicit(@\seebelow@) basic_simd(U&& value) noexcept;
1720817208
template<class U, class UAbi>
1720917209
constexpr explicit(@\seebelow@) basic_simd(const basic_simd<U, UAbi>&) noexcept;
1721017210
template<class G> constexpr explicit basic_simd(G&& gen) noexcept;
@@ -17310,7 +17310,7 @@
1731017310

1731117311
\pnum
1731217312
\recommended
17313-
Implementations should support explicit conversions between specializations of
17313+
Implementations should support implicit conversions between specializations of
1731417314
\tcode{basic_simd} and appropriate \impldef{conversions of \tcode{basic_simd}
1731517315
from/to implementation-specific vector types} types.
1731617316
\begin{note}
@@ -17321,7 +17321,7 @@
1732117321
\rSec3[simd.ctor]{\tcode{basic_simd} constructors}
1732217322

1732317323
\begin{itemdecl}
17324-
template<class U> constexpr basic_simd(U&&) noexcept;
17324+
template<class U> constexpr explicit(@\seebelow@) basic_simd(U&& value) noexcept;
1732517325
\end{itemdecl}
1732617326

1732717327
\begin{itemdescr}
@@ -17330,24 +17330,29 @@
1733017330

1733117331
\pnum
1733217332
\constraints
17333-
\tcode{From} satisfies \tcode{convertible_to<value_type>}, and either
17333+
\tcode{value_type} satisfies \tcode{constructible_from<U>}.
17334+
17335+
\pnum
17336+
\effects
17337+
Initializes each element to the value of the argument after conversion to
17338+
\tcode{value_type}.
17339+
17340+
\pnum
17341+
\remarks
17342+
The expression inside \tcode{explicit} evaluates to \tcode{false} if and only if
17343+
\tcode{U} satisfies \tcode{convertible_to<value_type>}, and either
1733417344
\begin{itemize}
17345+
\item
17346+
\tcode{From} is not an arithmetic type and does not satisfy
17347+
\exposconcept{constexpr-wrapper-like},
1733517348
\item
1733617349
\tcode{From} is an arithmetic type and the conversion from \tcode{From} to
1733717350
\tcode{value_type} is value-preserving\iref{simd.general}, or
1733817351
\item
17339-
\tcode{From} is not an arithmetic type and does not satisfy
17340-
\tcode{\exposconcept{constexpr-wrapper-like}}, or
17341-
\item
17342-
\tcode{From} satisfies \tcode{\exposconcept{constexpr-wrapper-like}},
17352+
\tcode{From} satisfies \exposconcept{constexpr-wrapper-like},
1734317353
\tcode{remove_const_t<decltype(From::value)>} is an arithmetic type, and
1734417354
\tcode{From::value} is representable by \tcode{value_type}.
1734517355
\end{itemize}
17346-
17347-
\pnum
17348-
\effects
17349-
Initializes each element to the value of the argument after conversion to
17350-
\tcode{value_type}.
1735117356
\end{itemdescr}
1735217357

1735317358
\begin{itemdecl}
@@ -17384,7 +17389,7 @@
1738417389
\end{itemdescr}
1738517390

1738617391
\begin{itemdecl}
17387-
template<class G> constexpr explicit basic_simd(G&& gen) noexcept;
17392+
template<class G> constexpr explicit basic_simd(G&& gen);
1738817393
\end{itemdecl}
1738917394

1739017395
\begin{itemdescr}
@@ -17408,10 +17413,7 @@
1740817413

1740917414
\pnum
1741017415
\remarks
17411-
The calls to \tcode{gen} are unsequenced with respect to each other.
17412-
Vectorization-unsafe\iref{algorithms.parallel.defns} standard library functions
17413-
may not be invoked by \tcode{gen}.
17414-
\tcode{gen} is invoked exactly once for each $i$.
17416+
\tcode{gen} is invoked exactly once for each $i$, in increasing order of $i$.
1741517417
\end{itemdescr}
1741617418

1741717419
\begin{itemdecl}
@@ -19180,7 +19182,7 @@
1918019182
\tcode{basic_simd_mask<Bytes, Abi>} is trivially copyable.
1918119183

1918219184
\pnum
19183-
\recommended Implementations should support explicit conversions between
19185+
\recommended Implementations should support implicit conversions between
1918419186
specializations of \tcode{basic_simd_mask} and appropriate \impldef{conversions
1918519187
of \tcode{basic_simd_mask} from/to implementation-specific vector types} types.
1918619188
\begin{note}
@@ -19218,7 +19220,7 @@
1921819220
\end{itemdescr}
1921919221

1922019222
\begin{itemdecl}
19221-
template<class G> constexpr explicit basic_simd_mask(G&& gen) noexcept;
19223+
template<class G> constexpr explicit basic_simd_mask(G&& gen);
1922219224
\end{itemdecl}
1922319225

1922419226
\begin{itemdescr}
@@ -19236,10 +19238,7 @@
1923619238

1923719239
\pnum
1923819240
\remarks
19239-
The calls to \tcode{gen} are unsequenced with respect to each other.
19240-
Vectorization-unsafe\iref{algorithms.parallel.defns} standard library
19241-
functions may not be invoked by \tcode{gen}.
19242-
\tcode{gen} is invoked exactly once for each $i$.
19241+
\tcode{gen} is invoked exactly once for each $i$, in increasing order of $i$.
1924319242
\end{itemdescr}
1924419243

1924519244
\rSec3[simd.mask.subscr]{\tcode{basic_simd_mask} subscript operator}

0 commit comments

Comments
 (0)