Skip to content

Commit b64be46

Browse files
Merge pull request #74 from brycelelbach/v2_bryce_edits
V2 bryce edits
2 parents e8524e0 + e06bf51 commit b64be46

File tree

5 files changed

+57
-56
lines changed

5 files changed

+57
-56
lines changed

src/algorithms.tex

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,46 @@
1111
expression that necessitates the temporary object.
1212

1313
\pnum
14-
An evaluation A \defn{contains} an evaluation B if:
14+
An evaluation \placeholder{A} \defn{contains} an evaluation \placeholder{B} if:
1515

1616
\begin{itemize}
17-
\item A and B are not potentially concurrent (\CppXref{intro.races}); and
18-
\item the start of A is the start of B or the start of A is sequenced before the start of B; and
19-
\item the completion of B is the completion of A or the completion of B is sequenced before the completion of A.
17+
\item \placeholder{A} and \placeholder{B} are not potentially concurrent (\CppXref{intro.races}); and
18+
\item the start of \placeholder{A} is the start of \placeholder{B} or the start of \placeholder{A} is sequenced before the start of \placeholder{B}; and
19+
\item the completion of \placeholder{B} is the completion of \placeholder{A} or the completion of \placeholder{B} is sequenced before the completion of \placeholder{A}.
2020
\end{itemize}
2121

2222
\begin{note}
2323
This includes evaluations occurring in function invocations.
2424
\end{note}
2525

2626
\pnum
27-
An evaluation A is \defn{ordered before} an evaluation B if A is
28-
deterministically sequenced before B. \begin{note}If A is indeterminately
29-
sequenced with respect to B or A and B are unsequenced, then A is not ordered
30-
before B and B is not ordered before A. The ordered before relationship is
31-
transitive.\end{note}
27+
An evaluation \placeholder{A} is \defn{ordered before} an evaluation \placeholder{B} if \placeholder{A} is deterministically sequenced before \placeholder{B}.
28+
\begin{note}If \placeholder{A} is indeterminately sequenced with respect to \placeholder{B} or \placeholder{A} and \placeholder{B} are unsequenced, then \placeholder{A} is not ordered
29+
before \placeholder{B} and \placeholder{B} is not ordered before \placeholder{A}.
30+
The ordered before relationship is transitive.\end{note}
3231

3332
\pnum
34-
For an evaluation A ordered before an evaluation B, both contained in the
35-
same invocation of an element access function, A is a \defn{vertical antecedent} of B if:
33+
For an evaluation \placeholder{A} ordered before an evaluation \placeholder{B}, both contained in the
34+
same invocation of an element access function, \placeholder{A} is a \defn{vertical antecedent} of \placeholder{B} if:
3635

3736
\begin{itemize}
38-
\item there exists an evaluation S such that:
37+
\item there exists an evaluation \placeholder{S} such that:
3938
\begin{itemize}
40-
\item S contains A, and
41-
\item S contains all evaluations C (if any) such that A is ordered before C and C is ordered before B,
42-
\item but S does not contain B, and
39+
\item \placeholder{S} contains \placeholder{A}, and
40+
\item \placeholder{S} contains all evaluations \placeholder{C} (if any) such that \placeholder{A} is ordered before \placeholder{C} and \placeholder{C} is ordered before \placeholder{B},
41+
\item but \placeholder{S} does not contain \placeholder{B}, and
4342
\end{itemize}
44-
\item control reached B from A without executing any of the following:
43+
\item control reached \placeholder{B} from \placeholder{A} without executing any of the following:
4544
\begin{itemize}
46-
\item a \tcode{goto} statement or \tcode{asm} declaration that jumps to a statement outside of S, or
47-
\item a \tcode{switch} statement executed within S that transfers control into a substatement of a nested selection or iteration statement, or
45+
\item a \tcode{goto} statement or \tcode{asm} declaration that jumps to a statement outside of \placeholder{S}, or
46+
\item a \tcode{switch} statement executed within \placeholder{S} that transfers control into a substatement of a nested selection or iteration statement, or
4847
\item a \tcode{throw} \begin{note}Even if caught\end{note}, or
49-
\item a \tcode{jongjmp}.
48+
\item a \tcode{longjmp}.
5049
\end{itemize}
5150
\end{itemize}
5251

5352
\begin{note}
54-
Vertical antecedent is an irreflexive, antisymmetric, nontransitive relationship between two evaluations. Informally, A is a vertical antecedent of B if A is sequenced immediately before B or A is nested zero or more levels within a statement S that immediately precedes B.
53+
Vertical antecedent is an irreflexive, antisymmetric, nontransitive relationship between two evaluations. Informally, \placeholder{A} is a vertical antecedent of \placeholder{B} if \placeholder{A} is sequenced immediately before \placeholder{B} or \placeholder{A} is nested zero or more levels within a statement \placeholder{S} that immediately precedes \placeholder{B}.
5554
\end{note}
5655

5756
\pnum
@@ -64,29 +63,29 @@
6463

6564
\pnum
6665
\defn{Horizontally matched} is an equivalence relationship between two
67-
evaluations of the same expression. An evaluation B\textsubscript{i} is
68-
\term{horizontally matched} with an evaluation B\textsubscript{j} if:
66+
evaluations of the same expression. An evaluation $B_i$ is
67+
\term{horizontally matched} with an evaluation $B_j$ if:
6968

7069
\begin{itemize}
7170
\item both are the first evaluations in their respective applications of the element access function, or
72-
\item there exist horizontally matched evaluations A\textsubscript{i} and A\textsubscript{j} that are vertical antecedents of evaluations B\textsubscript{i} and B\textsubscript{j}, respectively.
71+
\item there exist horizontally matched evaluations $A_i$ and $A_j$ that are vertical antecedents of evaluations $B_i$ and $B_j$, respectively.
7372
\end{itemize}
7473

7574
\begin{note}\term{Horizontally matched} establishes a theoretical \emph{lock-step} relationship between evaluations in different applications of an element access function.\end{note}
7675

7776
\pnum
78-
Let $f$ be a function called for each argument list in a sequence of argument lists. \defn{Wavefront application} of $f$ requires that evaluation A\textsubscript{i} be sequenced before evaluation B\textsubscript{j} if i < j and:
77+
Let $f$ be a function called for each argument list in a sequence of argument lists. \defn{Wavefront application} of $f$ requires that evaluation $A_i$ be sequenced before evaluation $B_j$ if $i < j$ and:
7978

8079
\begin{itemize}
81-
\item A\textsubscript{i} is sequenced before some evaluation B\textsubscript{i} and B\textsubscript{i} is horizontally matched with B\textsubscript{j}, or
82-
\item A\textsubscript{i} is horizontally matched with some evaluation A\textsubscript{j} and A\textsubscript{j} is sequenced before B\textsubscript{j}.
80+
\item $A_i$ is sequenced before some evaluation $B_i$ and $B_i$ is horizontally matched with $B_j$, or
81+
\item $A_i$ is horizontally matched with some evaluation $A_j$ and $A_j$ is sequenced before $B_j$.
8382
\end{itemize}
8483

8584
\begin{note}
86-
\term{Wavefront application} guarantees that parallel applications i and j execute such that progress on application j never gets \emph{ahead} of application i.
85+
\term{Wavefront application} guarantees that parallel applications $i$ and $j$ execute such that progress on application $j$ never gets \emph{ahead} of application $i$.
8786
\end{note}
8887
\begin{note}
89-
The relationships between A\textsubscript{i} and B\textsubscript{i} and between A\textsubscript{j} and B\textsubscript{j} are \term{sequenced before}, not \term{vertical antecedent}.
88+
The relationships between $A_i$ and $B_i$ and between $A_j$ and $B_j$ are \term{sequenced before}, not \term{vertical antecedent}.
9089
\end{note}
9190

9291
\rSec1[parallel.alg.ops]{Non-Numeric Parallel Algorithms}
@@ -269,11 +268,11 @@
269268
extern float x[], y[], a;
270269
float s = 0;
271270
for_loop(execution::vec, 0, n,
272-
reduction(s, 0.0f, plus<>()),
273-
[&](int i, float& accum) {
274-
y[i] += a*x[i];
275-
accum += y[i]*y[i];
276-
}
271+
reduction(s, 0.0f, plus<>()),
272+
[&](int i, float& accum) {
273+
y[i] += a*x[i];
274+
accum += y[i]*y[i];
275+
}
277276
);
278277
\end{codeblock}
279278
\end{example}
@@ -372,7 +371,7 @@
372371

373372
\begin{itemdescr}
374373
\pnum
375-
\effects Evaluates \tcode{std::forward<F>(f)()}. When invoked within an element access function in a parallel algorithm using \tcode{vector_policy}, if two calls to \tcode{no_vec} are horizontally matched within a wavefront application of an element access function over input sequence S, then the execution of \tcode{f} in the application for one element in S is sequenced before the execution of \tcode{f} in the application for a subsequent element in S; otherwise, there is no effect on sequencing.
374+
\effects Evaluates \tcode{std::forward<F>(f)()}. When invoked within an element access function in a parallel algorithm using \tcode{vector_policy}, if two calls to \tcode{no_vec} are horizontally matched within a wavefront application of an element access function over input sequence \placeholder{S}, then the execution of \tcode{f} in the application for one element in \placeholder{S} is sequenced before the execution of \tcode{f} in the application for a subsequent element in \placeholder{S}; otherwise, there is no effect on sequencing.
376375

377376
\pnum
378377
\returns The result of \tcode{f}.
@@ -382,10 +381,11 @@
382381

383382
\begin{example}
384383
\begin{codeblock}
384+
extern float y[];
385385
extern int* p;
386-
for_loop(vec, 0, n[&](int i) {
387-
y[i] +=y[i+1];
388-
if(y[i] < 0) {
386+
for_loop(vec, 0, n, [&](int i) {
387+
y[i] += y[i+1];
388+
if (y[i] < 0) {
389389
no_vec([]{
390390
*p++ = i;
391391
});

src/executionpolicies.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
\rSec1[parallel.execpol.objects]{Execution policy objects}
8888

8989
\begin{codeblock}
90-
inline constexpr execution::unsequenced_policy unseq{ @\unspec@ };
91-
inline constexpr execution::vector_policy vec{ @\unspec@ };
90+
inline constexpr execution::unsequenced_policy unseq { @\unspec@ };
91+
inline constexpr execution::vector_policy vec { @\unspec@ };
9292
\end{codeblock}
9393

9494
\pnum

src/general.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
\topline
4242
\lhdr{Title} & \chdr{Section} & \chdr{Macro Name} & \chdr{Value} & \rhdr{Header} \\
4343
\capsep
44-
Task Block R5 & \ref{parallel.taskblock} & \tcode{__cpp_lib_experimental_parallel_task_block} & 201711 & \tcode{<experimental/exception_list> \ <experimental/task_block>} \\
44+
Task Block & \ref{parallel.taskblock} & \tcode{__cpp_lib_experimental_parallel_task_block} & 201711 & \tcode{<experimental/exception_list> \ <experimental/task_block>} \\
4545
\hline
4646
Vector and Wavefront Policies & \ref{parallel.execpol.unseq} & \tcode{__cpp_lib_experimental_execution_vector_policy} & 201711 & \tcode{<experimental/algorithm> \ <experimental/execution>} \\
4747
\hline

src/simd.tex

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@
11291129

11301130
\begin{itemdescr}
11311131
\pnum\returns
1132-
A \tcode{simd_mask} object with the $i^\text{th}$ element set to \tcode{!operator[](i)} \foralli.
1132+
A \tcode{simd_mask} object with the $i^\text{th}$ element set to \tcode{!operator[]($i$)} \foralli.
11331133
\end{itemdescr}
11341134

11351135
\begin{itemdecl}
@@ -1159,7 +1159,7 @@
11591159

11601160
\begin{itemdescr}
11611161
\pnum\returns
1162-
A \tcode{simd} object where the $i^\text{th}$ element is initialized to \tcode{-operator[](i)} \foralli.
1162+
A \tcode{simd} object where the $i^\text{th}$ element is initialized to \tcode{-operator[]($i$)} \foralli.
11631163
\end{itemdescr}
11641164

11651165
\rSec1[parallel.simd.nonmembers]{Non-member operations}
@@ -1804,7 +1804,7 @@
18041804
\end{itemize}
18051805

18061806
\pnum\effects
1807-
Copies all \tcode{simd_mask} elements as if \tcode{mem[$i$] = operator[](i)} \foralli.
1807+
Copies all \tcode{simd_mask} elements as if \tcode{mem[$i$] = operator[]($i$)} \foralli.
18081808

18091809
\pnum\throws Nothing.
18101810

@@ -2007,21 +2007,21 @@
20072007
The parameter type \tcode{T} is an unspecified type that is only constructible via implicit conversion from \tcode{bool}.
20082008
\end{itemdescr}
20092009

2010-
\rSec2[parallel.simd.mask.where]{Where functions}
2010+
\rSec2[parallel.simd.mask.where]{\tcode{where} functions}
20112011

20122012
\begin{itemdecl}
20132013
template<class T, class Abi>
2014-
where_expression<simd_mask<T, Abi>, simd<T, Abi>> where(const typename simd<T, Abi>::mask_type& k,
2015-
simd<T, Abi>& v) noexcept;
2014+
where_expression<simd_mask<T, Abi>, simd<T, Abi>>
2015+
where(const typename simd<T, Abi>::mask_type& k, simd<T, Abi>& v) noexcept;
20162016
template<class T, class Abi>
2017-
const_where_expression<simd_mask<T, Abi>, simd<T, Abi>> where(const typename simd<T, Abi>::mask_type& k,
2018-
const simd<T, Abi>& v) noexcept;
2017+
const_where_expression<simd_mask<T, Abi>, simd<T, Abi>>
2018+
where(const typename simd<T, Abi>::mask_type& k, const simd<T, Abi>& v) noexcept;
20192019
template<class T, class Abi>
2020-
where_expression<simd_mask<T, Abi>, simd_mask<T, Abi>> where(const type_identity_t<simd_mask<T, Abi>>& k,
2021-
simd_mask<T, Abi>& v) noexcept;
2020+
where_expression<simd_mask<T, Abi>, simd_mask<T, Abi>>
2021+
where(const type_identity_t<simd_mask<T, Abi>>& k, simd_mask<T, Abi>& v) noexcept;
20222022
template<class T, class Abi>
2023-
const_where_expression<simd_mask<T, Abi>, simd_mask<T, Abi>> where(const type_identity_t<simd_mask<T, Abi>>& k,
2024-
const simd_mask<T, Abi>& v) noexcept;
2023+
const_where_expression<simd_mask<T, Abi>, simd_mask<T, Abi>>
2024+
where(const type_identity_t<simd_mask<T, Abi>>& k, const simd_mask<T, Abi>& v) noexcept;
20252025
\end{itemdecl}
20262026

20272027
\begin{itemdescr}
@@ -2030,9 +2030,12 @@
20302030
\end{itemdescr}
20312031

20322032
\begin{itemdecl}
2033-
template<class T> where_expression<bool T> where(@\seebelow@ k, T& v) noexcept;
20342033
template<class T>
2035-
const_where_expression<bool, T> where(@\seebelow@ k, const T& v) noexcept;
2034+
where_expression<bool T>
2035+
where(@\seebelow@ k, T& v) noexcept;
2036+
template<class T>
2037+
const_where_expression<bool, T>
2038+
where(@\seebelow@ k, const T& v) noexcept;
20362039
\end{itemdecl}
20372040

20382041
\begin{itemdescr}

src/taskblock.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
than an exception is pending within the current parallel block. See
4343
\ref{parallel.taskblock.exceptions}, below.
4444

45-
\rSec2[parallel.taskblock.task_cancelled_exception.what]{\tcode{task_cancelled_exception} member function \tcode{what}}
46-
4745
\begin{itemdecl}
4846
virtual const char* what() const noexcept;
4947
\end{itemdecl}

0 commit comments

Comments
 (0)