Skip to content

Commit 4536605

Browse files
committed
[simd.complex.access] Move into [simd.class]
The complex accessors are member functions. Also adjust the subclause heading to fit the new surroundings. Fixes NB US 179-293 (C++26 CD).
1 parent e7e5b69 commit 4536605

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

source/numerics.tex

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -17614,6 +17614,14 @@
1761417614
template<@\exposconcept{simd-integral}@ I>
1761517615
constexpr resize_t<I::size(), basic_vec> operator[](const I& indices) const;
1761617616

17617+
// \ref{simd.complex.access}, \tcode{basic_vec} complex accessors
17618+
constexpr auto real() const noexcept;
17619+
constexpr auto imag() const noexcept;
17620+
template<@\exposconcept{simd-floating-point}@ V>
17621+
constexpr void real(const V& v) noexcept;
17622+
template<@\exposconcept{simd-floating-point}@ V>
17623+
constexpr void imag(const V& v) noexcept;
17624+
1761717625
// \ref{simd.unary}, \tcode{basic_vec} unary operators
1761817626
constexpr basic_vec& operator++() noexcept;
1761917627
constexpr basic_vec operator++(int) noexcept;
@@ -17660,14 +17668,6 @@
1766017668
friend constexpr mask_type operator>(const basic_vec&, const basic_vec&) noexcept;
1766117669
friend constexpr mask_type operator<(const basic_vec&, const basic_vec&) noexcept;
1766217670

17663-
// \ref{simd.complex.access}, \tcode{basic_vec} complex-value accessors
17664-
constexpr auto real() const noexcept;
17665-
constexpr auto imag() const noexcept;
17666-
template<@\exposconcept{simd-floating-point}@ V>
17667-
constexpr void real(const V& v) noexcept;
17668-
template<@\exposconcept{simd-floating-point}@ V>
17669-
constexpr void imag(const V& v) noexcept;
17670-
1767117671
// \ref{simd.cond}, \tcode{basic_vec} exposition only conditional operators
1767217672
friend constexpr basic_vec @\exposid{simd-select-impl}@( // \expos
1767317673
const mask_type&, const basic_vec&, const basic_vec&) noexcept;
@@ -17951,6 +17951,59 @@
1795117951
Equivalent to: \tcode{return permute(*this, indices);}
1795217952
\end{itemdescr}
1795317953

17954+
\rSec3[simd.complex.access]{\tcode{basic_vec} complex accessors}
17955+
17956+
\indexlibrarymember{real}{basic_vec}
17957+
\indexlibrarymember{imag}{basic_vec}
17958+
\begin{itemdecl}
17959+
constexpr auto real() const noexcept;
17960+
constexpr auto imag() const noexcept;
17961+
\end{itemdecl}
17962+
17963+
\begin{itemdescr}
17964+
\pnum
17965+
\constraints
17966+
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled.
17967+
17968+
\pnum
17969+
\returns
17970+
An object of type \tcode{rebind_t<typename T::value_type, basic_vec>}
17971+
where the $i^\text{th}$ element is initialized to the result of
17972+
\tcode{\placeholder{cmplx-func}(operator[]($i$))} for all $i$ in the range
17973+
\range{0}{size()}, where \placeholder{cmplx-func} is the corresponding function
17974+
from \libheader{complex}.
17975+
\end{itemdescr}
17976+
17977+
\indexlibrarymember{real}{basic_vec}
17978+
\indexlibrarymember{imag}{basic_vec}
17979+
\begin{itemdecl}
17980+
template<@\exposconcept{simd-floating-point}@ V>
17981+
constexpr void real(const V& v) noexcept;
17982+
template<@\exposconcept{simd-floating-point}@ V>
17983+
constexpr void imag(const V& v) noexcept;
17984+
\end{itemdecl}
17985+
17986+
\begin{itemdescr}
17987+
\pnum
17988+
\constraints
17989+
\begin{itemize}
17990+
\item
17991+
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled,
17992+
\item
17993+
\tcode{\libconcept{same_as}<typename V::value_type, typename T::value_type>}
17994+
is modeled, and
17995+
\item
17996+
\tcode{V::size() == size()} is \tcode{true}.
17997+
\end{itemize}
17998+
17999+
\pnum
18000+
\effects
18001+
Replaces each element of the \tcode{basic_vec} object such that the
18002+
$i^\text{th}$ element is replaced with \tcode{value_type(v[$i$],
18003+
operator[]($i$).imag())} or \tcode{value_type(operator[]($i$).real(), v[$i$])}
18004+
for \tcode{real} and \tcode{imag} respectively, for all $i$ in the range \range{0}{size()}.
18005+
\end{itemdescr}
18006+
1795418007
\rSec3[simd.unary]{\tcode{basic_vec} unary operators}
1795518008

1795618009
\pnum
@@ -18259,59 +18312,6 @@
1825918312
operation.
1826018313
\end{itemdescr}
1826118314

18262-
\rSec3[simd.complex.access]{\tcode{vec} complex accessors}
18263-
18264-
\indexlibrarymember{real}{basic_vec}
18265-
\indexlibrarymember{imag}{basic_vec}
18266-
\begin{itemdecl}
18267-
constexpr auto real() const noexcept;
18268-
constexpr auto imag() const noexcept;
18269-
\end{itemdecl}
18270-
18271-
\begin{itemdescr}
18272-
\pnum
18273-
\constraints
18274-
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled.
18275-
18276-
\pnum
18277-
\returns
18278-
An object of type \tcode{rebind_t<typename T::value_type, basic_vec>}
18279-
where the $i^\text{th}$ element is initialized to the result of
18280-
\tcode{\placeholder{cmplx-func}(operator[]($i$))} for all $i$ in the range
18281-
\range{0}{size()}, where \placeholder{cmplx-func} is the corresponding function
18282-
from \libheader{complex}.
18283-
\end{itemdescr}
18284-
18285-
\indexlibrarymember{real}{basic_vec}
18286-
\indexlibrarymember{imag}{basic_vec}
18287-
\begin{itemdecl}
18288-
template<@\exposconcept{simd-floating-point}@ V>
18289-
constexpr void real(const V& v) noexcept;
18290-
template<@\exposconcept{simd-floating-point}@ V>
18291-
constexpr void imag(const V& v) noexcept;
18292-
\end{itemdecl}
18293-
18294-
\begin{itemdescr}
18295-
\pnum
18296-
\constraints
18297-
\begin{itemize}
18298-
\item
18299-
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled,
18300-
\item
18301-
\tcode{\libconcept{same_as}<typename V::value_type, typename T::value_type>}
18302-
is modeled, and
18303-
\item
18304-
\tcode{V::size() == size()} is \tcode{true}.
18305-
\end{itemize}
18306-
18307-
\pnum
18308-
\effects
18309-
Replaces each element of the \tcode{basic_vec} object such that the
18310-
$i^\text{th}$ element is replaced with \tcode{value_type(v[$i$],
18311-
operator[]($i$).imag())} or \tcode{value_type(operator[]($i$).real(), v[$i$])}
18312-
for \tcode{real} and \tcode{imag} respectively, for all $i$ in the range \range{0}{size()}.
18313-
\end{itemdescr}
18314-
1831518315
\rSec3[simd.cond]{\tcode{basic_vec} exposition only conditional operators}
1831618316

1831718317
\begin{itemdecl}

0 commit comments

Comments
 (0)