Skip to content
Merged
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
122 changes: 61 additions & 61 deletions source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17614,6 +17614,14 @@
template<@\exposconcept{simd-integral}@ I>
constexpr resize_t<I::size(), basic_vec> operator[](const I& indices) const;

// \ref{simd.complex.access}, \tcode{basic_vec} complex accessors
constexpr auto real() const noexcept;
constexpr auto imag() const noexcept;
template<@\exposconcept{simd-floating-point}@ V>
constexpr void real(const V& v) noexcept;
template<@\exposconcept{simd-floating-point}@ V>
constexpr void imag(const V& v) noexcept;

// \ref{simd.unary}, \tcode{basic_vec} unary operators
constexpr basic_vec& operator++() noexcept;
constexpr basic_vec operator++(int) noexcept;
Expand Down Expand Up @@ -17660,14 +17668,6 @@
friend constexpr mask_type operator>(const basic_vec&, const basic_vec&) noexcept;
friend constexpr mask_type operator<(const basic_vec&, const basic_vec&) noexcept;

// \ref{simd.complex.access}, \tcode{basic_vec} complex-value accessors
constexpr auto real() const noexcept;
constexpr auto imag() const noexcept;
template<@\exposconcept{simd-floating-point}@ V>
constexpr void real(const V& v) noexcept;
template<@\exposconcept{simd-floating-point}@ V>
constexpr void imag(const V& v) noexcept;

// \ref{simd.cond}, \tcode{basic_vec} exposition only conditional operators
friend constexpr basic_vec @\exposid{simd-select-impl}@( // \expos
const mask_type&, const basic_vec&, const basic_vec&) noexcept;
Expand Down Expand Up @@ -17951,6 +17951,59 @@
Equivalent to: \tcode{return permute(*this, indices);}
\end{itemdescr}

\rSec3[simd.complex.access]{\tcode{basic_vec} complex accessors}

\indexlibrarymember{real}{basic_vec}
\indexlibrarymember{imag}{basic_vec}
\begin{itemdecl}
constexpr auto real() const noexcept;
constexpr auto imag() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\constraints
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled.

\pnum
\returns
An object of type \tcode{rebind_t<typename T::value_type, basic_vec>}
where the $i^\text{th}$ element is initialized to the result of
\tcode{\placeholder{cmplx-func}(operator[]($i$))} for all $i$ in the range
\range{0}{size()}, where \placeholder{cmplx-func} is the corresponding function
from \libheader{complex}.
\end{itemdescr}

\indexlibrarymember{real}{basic_vec}
\indexlibrarymember{imag}{basic_vec}
\begin{itemdecl}
template<@\exposconcept{simd-floating-point}@ V>
constexpr void real(const V& v) noexcept;
template<@\exposconcept{simd-floating-point}@ V>
constexpr void imag(const V& v) noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\constraints
\begin{itemize}
\item
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled,
\item
\tcode{\libconcept{same_as}<typename V::value_type, typename T::value_type>}
is modeled, and
\item
\tcode{V::size() == size()} is \tcode{true}.
\end{itemize}

\pnum
\effects
Replaces each element of the \tcode{basic_vec} object such that the
$i^\text{th}$ element is replaced with \tcode{value_type(v[$i$],
operator[]($i$).imag())} or \tcode{value_type(operator[]($i$).real(), v[$i$])}
for \tcode{real} and \tcode{imag} respectively, for all $i$ in the range \range{0}{size()}.
\end{itemdescr}

\rSec3[simd.unary]{\tcode{basic_vec} unary operators}

\pnum
Expand Down Expand Up @@ -18259,59 +18312,6 @@
operation.
\end{itemdescr}

\rSec3[simd.complex.access]{\tcode{vec} complex accessors}

\indexlibrarymember{real}{basic_vec}
\indexlibrarymember{imag}{basic_vec}
\begin{itemdecl}
constexpr auto real() const noexcept;
constexpr auto imag() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\constraints
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled.

\pnum
\returns
An object of type \tcode{rebind_t<typename T::value_type, basic_vec>}
where the $i^\text{th}$ element is initialized to the result of
\tcode{\placeholder{cmplx-func}(operator[]($i$))} for all $i$ in the range
\range{0}{size()}, where \placeholder{cmplx-func} is the corresponding function
from \libheader{complex}.
\end{itemdescr}

\indexlibrarymember{real}{basic_vec}
\indexlibrarymember{imag}{basic_vec}
\begin{itemdecl}
template<@\exposconcept{simd-floating-point}@ V>
constexpr void real(const V& v) noexcept;
template<@\exposconcept{simd-floating-point}@ V>
constexpr void imag(const V& v) noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\constraints
\begin{itemize}
\item
\tcode{\exposconcept{simd-complex}<basic_vec>} is modeled,
\item
\tcode{\libconcept{same_as}<typename V::value_type, typename T::value_type>}
is modeled, and
\item
\tcode{V::size() == size()} is \tcode{true}.
\end{itemize}

\pnum
\effects
Replaces each element of the \tcode{basic_vec} object such that the
$i^\text{th}$ element is replaced with \tcode{value_type(v[$i$],
operator[]($i$).imag())} or \tcode{value_type(operator[]($i$).real(), v[$i$])}
for \tcode{real} and \tcode{imag} respectively, for all $i$ in the range \range{0}{size()}.
\end{itemdescr}

\rSec3[simd.cond]{\tcode{basic_vec} exposition only conditional operators}

\begin{itemdecl}
Expand Down