[simd.expos.defn] # 29 Numerics library [[numerics]](./#numerics) ## 29.10 Data-parallel types [[simd]](simd#expos.defn) ### 29.10.2 Exposition-only types, variables, and concepts [[simd.expos]](simd.expos#defn) #### 29.10.2.1 Exposition-only helpers [simd.expos.defn] [🔗](#itemdecl:1) `using simd-size-type = see below; ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16280) *simd-size-type* is an alias for a signed integer type[.](#1.sentence-1) [🔗](#itemdecl:2) `template using integer-from = see below; ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16289) *integer-from* is an alias for a signed integer typeT such that sizeof(T) equals Bytes[.](#2.sentence-1) [🔗](#itemdecl:3) `template constexpr simd-size-type simd-size-v = see below; ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16300) *simd-size-v* denotes the width of basic_vec if the specialization basic_vec is enabled, or 0 otherwise[.](#3.sentence-1) [🔗](#itemdecl:4) `template constexpr size_t mask-element-size = see below; ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16311) *mask-element-size*> has the valueBytes[.](#4.sentence-1) [🔗](#itemdecl:5) `template using deduced-vec-t = see below; ` [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16321) Let x denote an lvalue of type const T[.](#5.sentence-1) [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16324) *deduced-vec-t* is an alias for - [(6.1)](#6.1) decltype(x + x), if the type of x + x is an enabled specialization of basic_vec; otherwise - [(6.2)](#6.2) void[.](#6.sentence-1) [🔗](#itemdecl:6) `template using make-compatible-simd-t = see below; ` [7](#7) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16340) Let x denote an lvalue of type const T[.](#7.sentence-1) [8](#8) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16343) *make-compatible-simd-t* is an alias for - [(8.1)](#8.1) *deduced-vec-t*, if that type is not void, otherwise - [(8.2)](#8.2) vec[.](#8.sentence-1) [🔗](#itemdecl:7) `template requires [math-floating-point](simd.expos#concept:math-floating-point "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") using math-common-simd-t = see below; ` [9](#9) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16361) Let T0 denote Ts...[0][.](#9.sentence-1) Let T1 denote Ts...[1][.](#9.sentence-2) Let TRest denote a pack such that T0, T1, TRest... is equivalent to Ts...[.](#9.sentence-3) [10](#10) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16367) Let *math-common-simd-t* be an alias for - [(10.1)](#10.1) *deduced-vec-t*, if sizeof...(Ts) equals 1; otherwise - [(10.2)](#10.2) common_type_t<*deduced-vec-t*, *deduced-vec-t*>, if sizeof...(Ts) equals 2 and [*math-floating-point*](simd.expos#concept:math-floating-point "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") &&[*math-floating-point*](simd.expos#concept:math-floating-point "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") is true; otherwise - [(10.3)](#10.3) common_type_t<*deduced-vec-t*, T1>, if sizeof...(Ts) equals 2 and *math-floating-​point*<​T0> is true; otherwise - [(10.4)](#10.4) common_type_t>, if sizeof...(Ts) equals 2; otherwise - [(10.5)](#10.5) common_type_t<*math-common-simd-t*, TRest...>, if *math-common-simd-t* is valid and denotes a type; otherwise - [(10.6)](#10.6) common_type_t<*math-common-simd-t*, T0, T1>[.](#10.sentence-1) [🔗](#concept:reduction-binary-operation) `template concept [reduction-binary-operation](#concept:reduction-binary-operation "29.10.2.1 Exposition-only helpers [simd.expos.defn]") = requires (const BinaryOperation binary_op, const vec v) { { binary_op(v, v) } -> [same_as](concept.same#concept:same_as "18.4.2 Concept same_­as [concept.same]")>; }; ` [11](#11) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L16404) Types BinaryOperation and T model[*reduction-binary-operation*](#concept:reduction-binary-operation "29.10.2.1 Exposition-only helpers [simd.expos.defn]") only if: - [(11.1)](#11.1) BinaryOperation is a binary element-wise operation and the operation is commutative[.](#11.1.sentence-1) - [(11.2)](#11.2) An object of type BinaryOperation can be invoked with two arguments of type basic_vec, with unspecified ABI tagAbi, returning a basic_vec[.](#11.2.sentence-1)