@@ -12,18 +12,22 @@ <h1>In general</h1>
12
12
< pre > std::vector<int> v = ...
13
13
14
14
// standard sequential sort
15
- std::sort(vec.begin(), vec.end());
15
+ < del > std::sort(vec.begin(), vec.end());</ del >
16
+ < ins > std::sort(std::begin(vec), std::end(vec));</ ins >
16
17
17
18
using namespace std::experimental::parallel;
18
19
19
20
// explicitly sequential sort
20
- sort(seq, v.begin(), v.end());
21
+ < del > sort(seq, v.begin(), v.end());</ del >
22
+ < ins > sort(seq, std::begin(v), std::end(v));</ ins >
21
23
22
24
// permitting parallel execution
23
- sort(par, v.begin(), v.end());
25
+ < del > sort(par, v.begin(), v.end());</ del >
26
+ < ins > sort(par, std::begin(v), std::end(v));</ ins >
24
27
25
28
// permitting vectorization as well
26
- sort(vec, v.begin(), v.end());
29
+ < del > sort(vec, v.begin(), v.end());</ del >
30
+ < ins > sort(vec, std::begin(v), std::end(v));</ ins >
27
31
28
32
// sort with dynamically-selected execution
29
33
size_t threshold = ...
@@ -33,7 +37,8 @@ <h1>In general</h1>
33
37
exec = par;
34
38
}
35
39
36
- sort(exec, v.begin(), v.end());</ pre >
40
+ < del > sort(exec, v.begin(), v.end());</ del >
41
+ < ins > sort(exec, std::begin(v), std::end(v));</ ins > </ pre >
37
42
</ cxx-example > < pre >
38
43
</ pre >
39
44
< cxx-note >
@@ -180,7 +185,8 @@ <h1>Dynamic execution policy</h1>
180
185
exec = std::par;
181
186
}
182
187
183
- std::sort(exec, sort_me.begin(), sort_me.end());</ pre >
188
+ < del > std::sort(exec, sort_me.begin(), sort_me.end());</ del >
189
+ < ins > std::sort(exec, std::begin(sort_me), std::end(sort_me));</ ins > </ pre >
184
190
</ cxx-example >
185
191
186
192
< p > Objects of type < code > execution_policy</ code > shall be constructible and assignable from objects of
0 commit comments