Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
384 changes: 136 additions & 248 deletions algorithms.html

Large diffs are not rendered by default.

52 changes: 20 additions & 32 deletions exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ <h1>Parallel exceptions</h1>
<cxx-section id="parallel.exceptions.behavior">
<h1>Exception reporting behavior</h1>
<p>
<ins2>During the execution of a standard parallel algorithm, </ins2>
<del2>I</del2><ins2>i</ins2>f temporary memory resources are required <del2>by the algorithm</del2> and none are available,
During the execution of a standard parallel algorithm,
if temporary memory resources are required and none are available,
the algorithm throws a <code>std::bad_alloc</code> exception.
</p>
<p>
During the execution of a standard parallel algorithm, if the application of a function
object terminates with an uncaught exception, the behavior of the program is determined
by the type of execution policy used to invoke the algorithm:
During the execution of a standard parallel algorithm, if the <del>application of a function
object</del><ins>invocation of an element access function</ins> terminates with an uncaught
exception, the behavior of the program is determined by the type of execution policy used to
invoke the algorithm:

<ul>
<li>
If the execution policy object is of type <code>class <del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2></code>,
If the execution policy object is of type <code>class parallel_vector_execution_policy</code>,
<code>std::terminate</code> shall be called.
</li>
<li>
If the execution policy object is of type <code>sequential_execution_policy</code> or
<code>parallel_execution_policy</code>, the execution of the algorithm terminates with an
<code>exception_list</code> exception. All uncaught exceptions thrown during
the application of user-provided function objects shall be contained in the
<code>exception_list</code>.<pre>
the <del>application of user-provided function objects</del><ins>invocations of element access functions</ins>
shall be contained in the <code>exception_list</code>.<pre>
</pre>

<cxx-note>
Expand Down Expand Up @@ -59,41 +60,28 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
namespace std {
namespace experimental {
namespace parallel {
<ins2>inline namespace v1 {</ins2>
inline namespace v1 {

class exception_list : public exception
{
public:
<del2>
typedef exception_ptr value_type;
typedef const value_type&amp; reference;
typedef const value_type&amp; const_reference;
typedef <em>implementation-defined</em> const_iterator;
typedef const_iterator iterator;
typedef typename iterator_traits<ins2>&lt;const_iterator&gt;</ins2>::difference_type difference_type;
typedef size_t size_type;</del2>
<ins2>
typedef <em>unspecified</em> iterator;</ins2>
typedef <em>unspecified</em> iterator;

size_t size() const noexcept;
iterator begin() const noexcept;
iterator end() const noexcept;

<ins2>const char* what() const noexcept override;</ins2>
<del2>
private:
std::list&lt;exception_ptr&gt; exceptions_; // exposition only
</del2>
const char* what() const override noexcept;
};
<ins2>}</ins2>
}
}
}
}
</pre>

<p>
The class <code>exception_list</code> <del2>is a container</del2> <ins2>owns a sequence</ins2> of <code>exception_ptr</code> objects <ins2>.The</ins2> parallel
algorithms may use <ins2>the <code>exception_list</code></ins2> to communicate uncaught exceptions encountered during parallel execution to the
The class <code>exception_list</code> owns a sequence of <code>exception_ptr</code> objects. The parallel
algorithms may use the <code>exception_list</code> to communicate uncaught exceptions encountered during parallel execution to the
caller of the algorithm.
</p>

Expand All @@ -118,7 +106,7 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>

<cxx-function>
<cxx-signature>
<del2>exception_list::</del2>iterator begin() const noexcept;
iterator begin() const noexcept;
</cxx-signature>

<cxx-returns>
Expand All @@ -128,21 +116,21 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>

<cxx-function>
<cxx-signature>
<del2>exception_list::</del2>iterator end() const noexcept;
iterator end() const noexcept;
</cxx-signature>

<cxx-returns>
An iterator <del2>which is the past-the-end value for the <code>exception_list</code></del2> <ins2>that is past the end of the owned sequence.</ins2>
An iterator that is past the end of the owned sequence.
</cxx-returns>
</cxx-function>

<cxx-function>
<cxx-signature>
<ins2>const char* what() const noexcept override;</ins2>
const char* what() const noexcept override;
</cxx-signature>

<cxx-returns>
<ins2>An implementation-defined NTBS.</ins2>
An implementation-defined NTBS.
</cxx-returns>
</cxx-function>
</cxx-section>
Expand Down
Loading