Files
2025-10-25 03:02:53 +03:00

4.0 KiB
Raw Permalink Blame History

[simd.traits]

29 Numerics library [numerics]

29.10 Data-parallel types [simd]

29.10.4 Type traits [simd.traits]

🔗

template<class T, class U = typename T::value_type> struct alignment { see below };

1

#

alignment<T, U> has a member value if and only if

T is a specialization of basic_mask and U is bool, or

T is a specialization of basic_vec and U is a vectorizable type.

2

#

If value is present, the type alignment<T, U> is aBinaryTypeTrait with a base characteristic ofintegral_constant<size_t, N> for some unspecifiedN ([simd.ctor], [simd.loadstore]).

[Note 1:

value identifies the alignment restrictions on pointers used for (converting) loads and stores for the given type T on arrays of typeU.

— end note]

3

#

The behavior of a program that adds specializations for alignment is undefined.

🔗

template<class T, class V> struct rebind { using type = see below; };

4

#

The member type is present if and only if

V is a data-parallel type,

T is a vectorizable type, and

deduce-abi-t<T, V::size()> has a member type type.

5

#

If V is a specialization of basic_vec, let Abi1 denote an ABI tag such that basic_vec<T, Abi1>::size() equalsV::size().

If V is a specialization of basic_mask, let Abi1 denote an ABI tag such that basic_mask<sizeof(T), Abi1>::size() equals V::size().

6

#

Where present, the member typedef type names basic_vec<T, Abi1> if V is a specialization of basic_vec orbasic_mask<sizeof(T), Abi1> if V is a specialization ofbasic_mask.

🔗

template<simd-size-type N, class V> struct resize { using type = see below; };

7

#

Let T denote

typename V::value_type if V is a specialization of basic_vec,

otherwise integer-from<mask-element-size> if V is a specialization of basic_mask.

8

#

The member type is present if and only if

V is a data-parallel type, and

deduce-abi-t<T, N> has a member type type.

9

#

If V is a specialization of basic_vec, let Abi1 denote an ABI tag such that basic_vec<T, Abi1>::size() equals N.

If V is a specialization of basic_mask, let Abi1 denote an ABI tag such that basic_mask<sizeof(T), Abi1>::size() equals N.

10

#

Where present, the member typedef type names basic_vec<T, Abi1> if V is a specialization of basic_vec orbasic_mask<sizeof(T), Abi1> if V is a specialization ofbasic_mask.