Skip to content

Commit 6f6e577

Browse files
committed
[algorithms.parallel.exec] Rephrase to avoid incorrect use of "may not".
Convert rationale sentence to a note.
1 parent fb640ee commit 6f6e577

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

source/algorithms.tex

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,16 @@
419419
which overrides the usual guarantee from \ref{intro.execution}
420420
that function executions do not overlap with one another.
421421
\end{note}
422-
Since \tcode{execution::unsequenced_policy} allows
422+
The behavior of a program is undefined if
423+
it invokes a vectorization-unsafe standard library function
424+
from user code
425+
called from a \tcode{execution::unsequenced_policy} algorithm.
426+
\begin{note}
427+
Because \tcode{execution::unsequenced_policy} allows
423428
the execution of element access functions
424429
to be interleaved on a single thread of execution,
425430
blocking synchronization, including the use of mutexes, risks deadlock.
426-
Thus, the synchronization with \tcode{execution::unsequenced_policy}
427-
is restricted as follows:
428-
vectorization-unsafe standard library functions may not be invoked
429-
by user code called from \tcode{execution::unsequenced_policy} algorithms.
431+
\end{note}
430432

431433
\pnum
432434
The invocations of element access functions in parallel algorithms invoked with
@@ -503,14 +505,16 @@
503505
which overrides the usual guarantee from \ref{intro.execution}
504506
that function executions do not overlap with one another.
505507
\end{note}
506-
Since \tcode{execution::parallel_unsequenced_policy} allows
508+
The behavior of a program is undefined if
509+
it invokes a vectorization-unsafe standard library function
510+
from user code
511+
called from a \tcode{execution::parallel_unsequenced_policy} algorithm.
512+
\begin{note}
513+
Because \tcode{execution::parallel_unsequenced_policy} allows
507514
the execution of element access functions
508515
to be interleaved on a single thread of execution,
509516
blocking synchronization, including the use of mutexes, risks deadlock.
510-
Thus, the synchronization with \tcode{execution::parallel_unsequenced_policy}
511-
is restricted as follows:
512-
vectorization-unsafe standard library functions may not be invoked by user code
513-
called from \tcode{execution::parallel_unsequenced_policy} algorithms.
517+
\end{note}
514518

515519
\pnum
516520
\begin{note}

0 commit comments

Comments
 (0)