Skip to content

Commit 1434eb3

Browse files
committed
Apply Matthias' corrections to <experimental/simd> synopsis
1 parent d9ecfe1 commit 1434eb3

File tree

1 file changed

+32
-29
lines changed

1 file changed

+32
-29
lines changed

data_parallel_types.html

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
4444

4545
namespace std::experimental {
4646
inline namespace parallelism_v2 {
47-
namespace simd_abi {
48-
49-
struct scalar {};
50-
template&lt;int N&gt; struct fixed_size {};
51-
template&lt;class T&gt; inline constexpr int max_fixed_size = <em>implementation-defined</em>;
52-
template&lt;class T&gt; using compatible = <em>implementation-defined</em>;
53-
template&lt;class T&gt; using native = <em>implementation-defined</em>;
54-
55-
template&lt;class T, size_t N&gt; struct deduce { using type = <em>see-below</em>; };
56-
template&lt;class T, size_t N&gt; using deduce_t = typename deduce&lt;T, N&gt;::type;
47+
namespace simd_abi {
48+
49+
struct scalar {};
50+
template&lt;int N&gt; struct fixed_size {};
51+
template&lt;class T&gt; inline constexpr int max_fixed_size = <em>implementation-defined</em>;
52+
template&lt;class T&gt; using compatible = <em>implementation-defined</em>;
53+
template&lt;class T&gt; using native = <em>implementation-defined</em>;
54+
55+
template&lt;class T, size_t N&gt; struct deduce { using type = <em>see-below</em>; };
56+
template&lt;class T, size_t N&gt; using deduce_t = typename deduce&lt;T, N&gt;::type;
57+
}
5758

5859
struct element_aligned_tag {};
5960
struct vector_aligned_tag {};
@@ -62,7 +63,7 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
6263
inline constexpr vector_aligned_tag vector_aligned{};
6364
template&lt;size_t N&gt; inline constexpr overaligned_tag&lt;N&gt; overaligned{};
6465

65-
<cxx-ref insynopsis="" to="parallel.simd.traits"></cxx-ref> traits
66+
<cxx-ref insynopsis="" to="parallel.simd.traits"></cxx-ref>
6667
template&lt;class T&gt; struct is_abi_tag;
6768
template&lt;class T&gt; inline constexpr bool is_abi_tag_v = is_abi_tag&lt;T&gt;::value;
6869

@@ -83,17 +84,17 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
8384
template&lt;class T, class U = typename T::value_type&gt;
8485
inline constexpr size_t memory_alignment_v = memory_alignment&lt;T,U&gt;::value;
8586

86-
<cxx-ref insynopsis="" to="parallel.simd.class"></cxx-ref> class template simd
87+
<cxx-ref insynopsis="" to="parallel.simd.class"></cxx-ref>
8788
template&lt;class T, class Abi = simd_abi::compatible&lt;T&gt;&gt; class simd;
88-
template&lt;class T&gt; using native_simd&lt;T, simd_abi::native&lt;T&gt;&gt;;
89+
template&lt;class T&gt; using native_simd = simd&lt;T, simd_abi::native&lt;T&gt;&gt;;
8990
template&lt;class T, int N&gt; using fixed_size_simd = simd&lt;T, simd_abi::fixed_size&lt;N&gt;&gt;;
9091

91-
<cxx-ref insynopsis="" to="parallel.simd.mask.class"></cxx-ref> class template simd_mask
92+
<cxx-ref insynopsis="" to="parallel.simd.mask.class"></cxx-ref>
9293
template&lt;class T, class Abi = simd_abi::compatible&lt;T&gt;&gt; class simd_mask;
93-
template&lt;class T&gt; using native_simd_mask&lt;T, simd_abi::native&lt;T&gt;&gt;;
94+
template&lt;class T&gt; using native_simd_mask = simd_mask&lt;T, simd_abi::native&lt;T&gt;&gt;;
9495
template&lt;class T, int N&gt; using fixed_size_simd_mask = simd_mask&lt;T, simd_abi::fixed_size&lt;N&gt;&gt;;
9596

96-
<cxx-ref insynopsis="" to="parallel.simd.casts"></cxx-ref> casts
97+
<cxx-ref insynopsis="" to="parallel.simd.casts"></cxx-ref>
9798
template&lt;class T, class U, class Abi&gt; <em>see-below</em> simd_cast(const simd&lt;U, Abi&gt;&);
9899
template&lt;class T, class U, class Abi&gt; <em>see-below</em> static_simd_cast(const simd&lt;U, Abi&gt;&);
99100

@@ -116,11 +117,11 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
116117
array&lt;V, simd_size_v&lt;typename V::value_type, Abi&gt; / V::size()&gt; split(const simd_mask&lt;typename V::value_type, Abi&gt;&);
117118

118119
template&lt;class T, class... Abis&gt;
119-
simd&lt;T, simd_abi::deduce_t&gt;T, (simd_size_v&lt;T, Abis&gt; + ...)&gt;&gt; concat(const simd&lt;T, Abis&gt;&...);
120+
simd&lt;T, simd_abi::deduce_t&lt;T, (simd_size_v&lt;T, Abis&gt; + ...)&gt;&gt; concat(const simd&lt;T, Abis&gt;&...);
120121
template&lt;class T, class... Abis&gt;
121-
simd_mask&lt;T, simd_abi::deduce_t&gt;T, (simd_size_v&lt;T, Abis&gt; + ...)&gt;&gt; concat(const simd_mask&lt;T, Abis&gt;&...);
122+
simd_mask&lt;T, simd_abi::deduce_t&lt;T, (simd_size_v&lt;T, Abis&gt; + ...)&gt;&gt; concat(const simd_mask&lt;T, Abis&gt;&...);
122123

123-
<cxx-ref insynopsys="" to="parallel.simd.mask.reductions"></cxx-ref> reductions
124+
// <cxx-ref insynopsys="" to="parallel.simd.mask.reductions"></cxx-ref> reductions
124125
template&lt;class T, class Abi&gt; bool all_of(const simd_mask&lt;T, Abi&gt;&) noexcept;
125126
template&lt;class T, class Abi&gt; bool any_of(const simd_mask&lt;T, Abi&gt;&) noexcept;
126127
template&lt;class T, class Abi&gt; bool none_of(const simd_mask&lt;T, Abi&gt;&) noexcept;
@@ -137,11 +138,11 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
137138
int find_first_set(<em>see-below</em>) noexcept;
138139
int find_last_set(<em>see-below</em>) noexcept;
139140

140-
<cxx-ref insynopsis="" to="parallel.simd.whereexpr"></cxx-ref> where expressions
141+
<cxx-ref insynopsis="" to="parallel.simd.whereexpr"></cxx-ref>
141142
template&lt;class M, class T&gt; class const_where_expression;
142143
template&lt;class M, class T&gt; class where_expression;
143144

144-
<cxx-ref insynopsis="" to="parallel.simd.mask.where"></cxx-ref> masked assignment
145+
<cxx-ref insynopsis="" to="parallel.simd.mask.where"></cxx-ref>
145146
template&lt;class T&gt; struct nodeduce { using type = T; }; // exposition only
146147
template&lt;class T&gt; using nodeduce_t = typename nodeduce&lt;T&gt;::type; // exposition only
147148

@@ -157,6 +158,9 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
157158
template&lt;class T, class Abi&gt;
158159
const_where_expression&lt;simd_mask&lt;T, Abi&gt;, simd_mask&lt;T, Abi&gt;&gt; where(const nodeduce_t&lt;simd_mask&lt;T, Abit&gt;&gt;&, const simd_mask&lt;T, Abi&gt;&) noexcept;
159160

161+
template&lt;class T&gt;
162+
where_expression&lt;bool, T&gt; where(<em>see-below</em> k, T& d) noexcept;
163+
160164
template&lt;class T&gt;
161165
const_where_expression&lt;bool, T&gt; where(<em>see-below</em> k, const T& d) noexcept;
162166

@@ -168,28 +172,27 @@ <h1><ins>Header <code>&lt;experimental/simd&gt;</code> synopsis</ins></h1>
168172
typename V::value_type reduce(const const_where_expression&lt;M, V&gt;& x,
169173
typename V::value_type identity_element, BinaryOperation binary_op);
170174
template&lt;class M, class V&gt;
171-
typename V::value_type reduce(const const_where_expression&lt;M, V&gt; x, plus&lt;&gt; binary_op = {});
175+
typename V::value_type reduce(const const_where_expression&lt;M, V&gt;& x, plus&lt;&gt; binary_op = {});
172176
template&lt;class M, class V&gt;
173-
typename V::value_type reduce(const const_where_expression&lt;M, V&gt; x, multiplies&lt;&gt; binary_op = {});
177+
typename V::value_type reduce(const const_where_expression&lt;M, V&gt;& x, multiplies&lt;&gt; binary_op);
174178
template&lt;class M, class V&gt;
175-
typename V::value_type reduce(const const_where_expression&lt;M, V&gt; x, bit_and&lt;&gt; binary_op = {});
179+
typename V::value_type reduce(const const_where_expression&lt;M, V&gt;& x, bit_and&lt;&gt; binary_op);
176180
template&lt;class M, class V&gt;
177-
typename V::value_type reduce(const const_where_expression&lt;M, V&gt; x, bit_or&lt;&gt; binary_op = {});
181+
typename V::value_type reduce(const const_where_expression&lt;M, V&gt;& x, bit_or&lt;&gt; binary_op);
178182
template&lt;class M, class V&gt;
179-
typename V::value_type reduce(const const_where_expression&lt;M, V&gt; x, bit_xor&lt;&gt; binary_op = {});
183+
typename V::value_type reduce(const const_where_expression&lt;M, V&gt;& x, bit_xor&lt;&gt; binary_op);
180184

181185
template&lt;class T, class Abi&gt; T hmin(const simd&lt;T, abi&gt;&);
182186
template&lt;class T, class Abi&gt; typename V::value_type hmin(const const_where_expression&lt;M, V&gt;&);
183187
template&lt;class T, class Abi&gt; T hmax(const simd&lt;T, abi&gt;&);
184188
template&lt;class T, class Abi&gt; typename V::value_type hmax(const const_where_expression&lt;M, V&gt;&);
185189

186-
<cxx-ref insynopsis="" to="parallel.simd.alg"></cxx-ref> algorithms
190+
<cxx-ref insynopsis="" to="parallel.simd.alg"></cxx-ref>
187191
template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt; min(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;
188192
template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt; max(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;
189-
template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt; minmax(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;
193+
template&lt;class T, class Abi&gt; pair&lt;simd&lt;T, Abi&gt;, simd&lt;T, Abi&gt;&gt; minmax(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;
190194
template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt; clamp(const simd&lt;T, Abi&gt;& v, const simd&lt;T, Abi&gt;& lo, const simd&lt;T, Abi&gt;& hi) noexcept;
191195
}
192-
}
193196
}
194197
</pre>
195198
</ins>

0 commit comments

Comments
 (0)