[simd.traits] # 29 Numerics library [[numerics]](./#numerics) ## 29.10 Data-parallel types [[simd]](simd#traits) ### 29.10.4 Type traits [simd.traits] [🔗](#lib:alignment,simd) `template struct alignment { see below }; ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17146) alignment has a member value if and only if - [(1.1)](#1.1) T is a specialization of basic_mask and U is bool, or - [(1.2)](#1.2) T is a specialization of basic_vec and U is a vectorizable type[.](#1.sentence-1) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17157) If value is present, the type alignment is aBinaryTypeTrait with a base characteristic ofintegral_constant for some unspecifiedN ([[simd.ctor]](simd.ctor "29.10.7.2 basic_­vec constructors"), [[simd.loadstore]](simd.loadstore "29.10.8.6 basic_­vec load and store functions"))[.](#2.sentence-1) [*Note [1](#note-1)*: value identifies the alignment restrictions on pointers used for (converting) loads and stores for the given type T on arrays of typeU[.](#2.sentence-2) — *end note*] [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17168) The behavior of a program that adds specializations for alignment is undefined[.](#3.sentence-1) [🔗](#lib:rebind,simd) `template struct rebind { using type = see below; }; ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17179) The member type is present if and only if - [(4.1)](#4.1) V is a data-parallel type, - [(4.2)](#4.2) T is a vectorizable type, and - [(4.3)](#4.3) *deduce-abi-t* has a member type type[.](#4.sentence-1) [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17188) If V is a specialization of basic_vec, let Abi1 denote an ABI tag such that basic_vec​::​​size() equalsV​::​size()[.](#5.sentence-1) If V is a specialization of basic_mask, let Abi1 denote an ABI tag such that basic_mask​::​​size() equals V​::​size()[.](#5.sentence-2) [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17196) Where present, the member typedef type names basic_vec if V is a specialization of basic_vec orbasic_mask if V is a specialization ofbasic_mask[.](#6.sentence-1) [🔗](#lib:resize,simd) `template struct resize { using type = see below; }; ` [7](#7) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17209) Let T denote - [(7.1)](#7.1) typename V​::​value_type if V is a specialization of basic_vec, - [(7.2)](#7.2) otherwise *integer-from*<*mask-element-size*> if V is a specialization of basic_mask[.](#7.sentence-1) [8](#8) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17220) The member type is present if and only if - [(8.1)](#8.1) V is a data-parallel type, and - [(8.2)](#8.2) *deduce-abi-t* has a member type type[.](#8.sentence-1) [9](#9) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17227) If V is a specialization of basic_vec, let Abi1 denote an ABI tag such that basic_vec​::​​size() equals N[.](#9.sentence-1) If V is a specialization of basic_mask, let Abi1 denote an ABI tag such that basic_mask​::​size() equals N[.](#9.sentence-2) [10](#10) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17233) Where present, the member typedef type names basic_vec if V is a specialization of basic_vec orbasic_mask if V is a specialization ofbasic_mask[.](#10.sentence-1)