diff --git a/P1928/changelog.tex b/P1928/changelog.tex index b7891a6..b50cc62 100644 --- a/P1928/changelog.tex +++ b/P1928/changelog.tex @@ -179,6 +179,9 @@ \section{Changelog} \item Apply improved wording from \ref{sec:simd.overview} to \ref{sec:simd.mask.overview}. \item Add comments for LWG to address to broadcast ctor (\ref{sec:simd.ctor}). \item Respecify generator ctor to not reuse broadcast constraint (\ref{sec:simd.ctor}). +\item Use \code{to_address} on contiguous iterators (\ref{sec:simd.ctor} and \ref{sec:simd.copy}). + This is more explicit about allowing memcpy on the complete range rather than + having to iterate the range per element. %\todo Reorder \code{simd} and \code{simd_mask} specification in the wording (mask first). \end{revision} diff --git a/P1928/wording.tex b/P1928/wording.tex index 74824df..14d8506 100644 --- a/P1928/wording.tex +++ b/P1928/wording.tex @@ -13,10 +13,10 @@ \newcommand\flagsRequires[2]{ \item If the template parameter pack \tcode{Flags} contains - \tcode{\alignedflag}, \tcode{addressof(*first)} points to storage + \tcode{\alignedflag}, \tcode{to_address(first)} points to storage aligned by \tcode{simd_alignment_v<#1>}. \item If the template parameter pack \tcode{Flags} contains - \tcode{\overalignedflag}, \tcode{addressof(*first)} + \tcode{\overalignedflag}, \tcode{to_address(first)} points to storage aligned by \tcode{N}. } @@ -725,7 +725,8 @@ \begin{itemdescr} \SimdLoadDescr {\range{first}{first + size()} is a valid range.} - {Initializes the $i^\text{th}$ element with \tcode{static_cast(first[$i$])} \foralli.} + {Initializes the $i^\text{th}$ element with \tcode{static_cast(to_address(first)[$i$])} + \foralli.} \end{itemdescr} \begin{itemdecl} @@ -736,7 +737,8 @@ \begin{itemdescr} \SimdLoadDescr {\validMaskedRange} - {Initializes the $i^\text{th}$ element with \tcode{mask[$i$] ? static_cast(first[$i$]) : T()} + {Initializes the $i^\text{th}$ element with \tcode{mask[$i$] ? + static_cast(to_address(first)[$i$]) : T()} \foralli.} \end{itemdescr} @@ -751,7 +753,7 @@ \SimdLoadDescr {\range{first}{first + size()} is a valid range.} {Replaces the elements of the \tcode{basic_simd} object such that the $i^\text{th}$ element is - assigned with \tcode{static_cast(first[$i$])} \foralli.} + assigned with \tcode{static_cast(to_address(first)[$i$])} \foralli.} \end{itemdescr} \begin{itemdecl} @@ -763,7 +765,7 @@ \SimdLoadDescr {\validMaskedRange} {Replaces the selected elements of the \tcode{basic_simd} object such that the $i^\text{th}$ - element is replaced with \tcode{static_cast(first[$i$])} \forallmaskedi.} + element is replaced with \tcode{static_cast(to_address(first)[$i$])} \forallmaskedi.} \end{itemdescr} \newcommand\SimdStoreDescr[2]{ @@ -794,7 +796,7 @@ \begin{itemdescr} \SimdStoreDescr {\range{first}{first + size()} is a valid range.} - {Copies all \tcode{basic_simd} elements as if \tcode{first[$i$] = + {Copies all \tcode{basic_simd} elements as if \tcode{to_address(first)[$i$] = static_cast>(operator[]($i$))} \foralli.} \end{itemdescr} @@ -806,7 +808,7 @@ \begin{itemdescr} \SimdStoreDescr {\validMaskedRange} - {Copies the selected elements as if \tcode{first[$i$] = + {Copies the selected elements as if \tcode{to_address(first)[$i$] = static_cast>(operator[]($i$))} \forallmaskedi.} \end{itemdescr}