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
The class template <code>simd</code> is a data-parallel type. The width of a given <code>simd</code> specialization is a constant expression, determined by the template parameters.
925
+
</ins>
926
+
</p>
927
+
928
+
<p>
929
+
<ins>
930
+
Every specialization of <code>simd</code> shall be a complete type. The specialization <code>simd<T, Abi></code> is supported if <code>T</code> is a vectorizable type and
931
+
932
+
<bl>
933
+
<li>
934
+
<ins>
935
+
<code>Abi</code> is <code>simd_abi::scalar</code>, or
936
+
</ins>
937
+
</li>
938
+
939
+
<li>
940
+
<ins>
941
+
<code>Abi</code> is <code>simd_abi::fixed_size<N></code>, with <code>N</code> is constrained as defined in <cxx-refto="parallel.simd.abi"></cxx-ref>.
942
+
</ins>
943
+
</li>
944
+
</bl>
945
+
946
+
<ins>
947
+
If <code>Abi</code> is an extended ABI tag, it is implementation-defined whether <code>simd<T, Abi></code> is supported. <cxx-note>The intent is for implementations to decide on the basis of the currently targeted system.</cxx-note>
948
+
949
+
<br><br>
950
+
951
+
If <code>simd<T, Abi></code> is not supported, the specialization shall have a deleted default constructor, deleted destructor, deleted copy constructor, and deleted copy assignment.
952
+
953
+
<br><br>
954
+
955
+
<cxx-example>
956
+
Consider an implementation that defines the extended ABI tags <code>__simd_x</code> and <code>__gpu_y</code>. When the compiler is invoked to translate to a machine that has support for the <code>__simd_x</code> ABI tag for all arithmetic types other than <code>long double</code> and no support for the <code>__gpu_y</code> ABI tag, then:
957
+
958
+
<bl>
959
+
<li>
960
+
<code>simd<T, simd_abi::__gpu_y></code> is not supported for any <code>T</code> and has a deleted constructor.
961
+
</li>
962
+
963
+
<li>
964
+
<code>simd<long double, simd_abi::__simd_x></code> is not supported and has a deleted constructor.
965
+
</li>
966
+
967
+
<li>
968
+
<code>simd<double, simd_abi::__simd_x></code> is supported.
969
+
</li>
970
+
971
+
<li>
972
+
<code>simd<long double, simd_abi::scalar></code> is supported.
973
+
</li>
974
+
</bl>
975
+
</cxx-example>
976
+
</ins>
977
+
</ins>
978
+
</p>
979
+
980
+
<p>
981
+
<ins>
982
+
Default intialization performs no initialization of the elements; value-initialization initializes each element with <code>T()</code>. <cxx-note>Thus, default initialization leaves the elements in an indeterminate state.</cxx-note>
983
+
</ins>
984
+
</p>
985
+
986
+
<cxx-function>
987
+
<cxx-signature><ins>
988
+
static constexpr size_t size() noexcept;</ins>
989
+
</cxx-signature>
990
+
991
+
<cxx-returns>
992
+
<ins>
993
+
The width of <code>simd<T, Abi></code>.
994
+
</ins>
995
+
</cxx-returns>
996
+
</cxx-function>
997
+
998
+
<p>
999
+
<ins>
1000
+
Implementations should enable explicit conversion from and to implementation-defined types. This adds one or more of the following declarations to class <code>simd</code>:
Consider an implementation that supports the type <code>__vec4f</code> and the function <code>__vec4f</code>, <code>_vec4f_addsub(__vec4f, __vec4f)</code> for the currently targeted system.
1013
+
A user may require the use of <code>_vec4f_addsub</code> for maximum performance and thus writes:
0 commit comments