You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<cxx-signature><ins>template<class T, class U, class Abi> <em>see-below</em> simd_cast(const simd<U, Abi>& x)</ins></cxx-signature>
1991
+
1992
+
<p>
1993
+
<ins>
1994
+
Let <code>To</code> identify <code>T::value_type</code> if <code>is_simd_v<T></code> is <code>true</code>, or <code>T</code> otherwise.
1995
+
</ins>
1996
+
</p>
1997
+
1998
+
<cxx-returns>
1999
+
<ins>
2000
+
A <code>simd</code> object with the <em>i</em>-th element initialized to <code>static_cast<To>(x[i])</code> for all <code>i</code> ∊ <code>[0, size())</code>.
2001
+
</ins>
2002
+
</cxx-returns>
2003
+
2004
+
<cxx-throws>
2005
+
<ins>
2006
+
Nothing.
2007
+
</ins>
2008
+
</cxx-throws>
2009
+
2010
+
<cxx-remarks>
2011
+
<ins>
2012
+
The function shall not participate in overload resolution unless
2013
+
2014
+
<bl>
2015
+
<li>
2016
+
<ins>
2017
+
every possible value of type <code>U</code> can be represented with type <code>To</code>, and
2018
+
</ins>
2019
+
</li>
2020
+
2021
+
<li>
2022
+
<ins>
2023
+
either
2024
+
2025
+
<ul>
2026
+
<li>
2027
+
<ins>
2028
+
<code>is_simd_v<T></code> is <code>false</code>, or
2029
+
</ins>
2030
+
</li>
2031
+
2032
+
<li>
2033
+
<ins>
2034
+
<code>T::size() == simd<U, Abi>::size()</code> is <code>true</code>.
2035
+
</ins>
2036
+
</li>
2037
+
</ul>
2038
+
</ins>
2039
+
</li>
2040
+
</bl>
2041
+
</ins>
2042
+
</cxx-remarks>
2043
+
2044
+
<p>
2045
+
<ins>
2046
+
The return type is
2047
+
</ins>
2048
+
2049
+
<bl>
2050
+
<li>
2051
+
<ins>
2052
+
<code>T</code> if <code>is_simd_v<T></code> is <code>true</code>, otherwise
2053
+
</ins>
2054
+
</li>
2055
+
2056
+
<li>
2057
+
<ins>
2058
+
<code>simd<T, Abi></code> is <code>U</code> is <code>T</code>, otherwise
<cxx-signature><ins>template<class T, class U, class Abi> <em>see-below</em> static_simd_cast(const simd<U, Abi>& x);</ins></cxx-signature>
2073
+
2074
+
<p>
2075
+
<ins>
2076
+
Let <code>To</code> identify <code>T::value_type</code> if <code>is_simd_v<T></code> is <code>true</code> or <code>T</code> otherwise.
2077
+
</ins>
2078
+
</p>
2079
+
2080
+
<cxx-returns>
2081
+
<ins>
2082
+
A <code>simd</code> object with the <em>i</em>-th element initialized to <code>static_cast<To>(x[i])</code> for all <code>i</code> ∊ <code>[0, size())</code>.
2083
+
</ins>
2084
+
</cxx-returns>
2085
+
2086
+
<cxx-throws>
2087
+
<ins>
2088
+
Nothing.
2089
+
</ins>
2090
+
</cxx-throws>
2091
+
2092
+
<cxx-remarks>
2093
+
<ins>
2094
+
The function shall not participate in overload resolution unless either
2095
+
2096
+
<bl>
2097
+
<li>
2098
+
<ins>
2099
+
<code>is_simd_v<T></code> is <code>false</code>, or
2100
+
</ins>
2101
+
</li>
2102
+
2103
+
<li>
2104
+
<ins>
2105
+
<code>T::size() == simd<U, Abi>::size()</code> is <code>true</code>.
2106
+
</ins>
2107
+
</li>
2108
+
</bl>
2109
+
</ins>
2110
+
</cxx-remarks>
2111
+
2112
+
<p>
2113
+
<ins>The return type is</ins>
2114
+
2115
+
<bl>
2116
+
<li>
2117
+
<ins>
2118
+
<code>T</code> if <code>is_simd_v<T></code> is <code>true</code>, otherwise
2119
+
</ins>
2120
+
</li>
2121
+
2122
+
<li>
2123
+
<ins>
2124
+
<code>simd<T, Abi></code> if either <code>U</code> is <code>T</code> or <code>U</code> and <code>T</code> are integral types that only differ in signedness, otherwise
A data-parallel object with the <em>i</em>-th element initialized to <code>x[i]</code> for all <code>i</code> ∊ <code>[0, size())</code>.
2148
+
</ins>
2149
+
</cxx-returns>
2150
+
</cxx-function>
2151
+
2152
+
<cxx-function>
2153
+
<cxx-signature><ins>
2154
+
template<class T, int N> native_simd<T> to_native(const fixed_size_simd<T, N>& x) noexcept;
2155
+
template<class T, int N> native_simd_mask<T> to_native(const fixed_size_simd_mask<T, N>& x) noexcept;
2156
+
</ins></cxx-signature>
2157
+
2158
+
<cxx-returns>
2159
+
<ins>
2160
+
A data-parallel object with the <em>i</em>-th element initialized to <code>x[i]</code> for all <code>i</code> ∊ <code>[0, size())</code>.
2161
+
</ins>
2162
+
</cxx-returns>
2163
+
2164
+
<cxx-remarks>
2165
+
<ins>
2166
+
These functions shall not participate in overload resolution unless <code>simd_size_v<T, simd_abi::native<T>> == N</code> is <code>true</code>.
2167
+
</ins>
2168
+
</cxx-remarks>
2169
+
</cxx-function>
2170
+
2171
+
<cxx-function>
2172
+
<cxx-signature><ins>
2173
+
template<class T, int N> simd<T> to_compatible(const fixed_size_simd<T, N>& x) noexcept;
2174
+
template<class T, int N> simd_mask<T> to_compatible(const fixed_size_simd_mask<T, N>& x) noexcept;
2175
+
</ins></cxx-signature>
2176
+
2177
+
<cxx-returns>
2178
+
<ins>
2179
+
A data-parallel object with the <em>i</em>-th element initialized to <code>x[i]</code> for all <code>i</code> ∊ <code>[0, size())</code>.
2180
+
</ins>
2181
+
</cxx-returns>
2182
+
2183
+
<cxx-remarks>
2184
+
<ins>
2185
+
These functions shall not participate in overload resolution unless <code>simd_size_v<T, simd_abi::compatible<T>> == N</code> is <code>true</code>.
2186
+
</ins>
2187
+
</cxx-remarks>
2188
+
</cxx-function>
2189
+
2190
+
<cxx-function>
2191
+
<cxx-signature><ins>
2192
+
template<size_t... Sizes, class T, class Abi>
A <code>tuple</code> of data-parallel objects with the <em>i</em>-th <code>simd</code>/<code>simd_mask</code> element of the <em>j</em>-th <code>tuple</code> element initialized to the value of the element <code>x</code> with index <em>i</em> + sum of the first <em>j</em> values in the <code>Sizes</code> pack.
2201
+
</ins>
2202
+
</cxx-returns>
2203
+
2204
+
<cxx-remarks>
2205
+
<ins>
2206
+
These functions shall not participate in overload resolution unless the sum of all values in the <code>Sizes</code> pack is equal to <code>simd_size_v<T, Abi></code>.
An <code>array</code> of data-parallel objects with the <em>i</em>-th <code>simd</code>/<code>simd_mask</code> element of the <em>j</em>-th <code>array</code> element initialized to the value of the element in <code>x</code> with index <code><em>i</em> + <em>j</em> * V::size()</code>.
2222
+
</ins>
2223
+
</cxx-returns>
2224
+
2225
+
<cxx-remarks>
2226
+
<ins>
2227
+
These functions shall not participate in overload resolution unless
2228
+
2229
+
<bl>
2230
+
<li>
2231
+
<ins>
2232
+
<code>simd_size_v<typename V::value_type, Abi></code> is an integral multiple of <code>V::size()</code>, and
2233
+
</ins>
2234
+
</li>
2235
+
2236
+
<li>
2237
+
<ins>
2238
+
for the overload with a <code>simd</code> parameter <code>is_simd_v<V></code> is <code>true</code>, for the overload with a <code>simd_mask</code> parameter <code>is_simd_mask_v<V></code> is <code>true</code>.
A data-parallel object initialized with the concatenated values in the <code>xs</code> pack of data-parallel objects: The <em>i</em>-th <code>simd</code>/<code>simd_mask</code> element of the <em>j</em>-th parameter in the <code>xs</code> pack is copied to the return value's element with index <em>i</em> + the sum of the width of the first <em>j</em> parameters in the <code>xs</code> pack.
0 commit comments