|
| 1 | +<?xml version='1.0' encoding='utf-8' standalone='no'?> |
| 2 | +<!DOCTYPE issue SYSTEM "lwg-issue.dtd"> |
| 3 | + |
| 4 | +<issue num="4344" status="New"> |
| 5 | +<title><code>affine_on</code> has no specification for the default</title> |
| 6 | +<section><sref ref="[exec.affine.on]"/></section> |
| 7 | +<submitter>Dietmar Kühl</submitter> |
| 8 | +<date>01 Sep 2025</date> |
| 9 | +<priority>99</priority> |
| 10 | + |
| 11 | +<discussion> |
| 12 | +<p> |
| 13 | +The wording of <code>affine_on</code> doesnt have a specification |
| 14 | +for the default implementation. For other algorithms the default |
| 15 | +implementation is specified. |
| 16 | +</p> |
| 17 | +<p> |
| 18 | +The intention for <code>affine_on</code> was to all |
| 19 | +optimisation/customisation in a way reducing the necessary scheduling: |
| 20 | +if the implementation can determine if a sender completed already |
| 21 | +on the correct execution agent it should be allowed to avoid |
| 22 | +scheduling. A specification should provide enough lattitude to |
| 23 | +allow that. |
| 24 | +</p> |
| 25 | +</discussion> |
| 26 | + |
| 27 | +<resolution> |
| 28 | +<p> |
| 29 | +Add a new paragraph to the specification of <code>affine_on</code> |
| 30 | +in <sref ref="[exec.affine.on]"/> providing |
| 31 | +a specification for the default implementation: |
| 32 | +</p> |
| 33 | +<p> |
| 34 | +<blockquote> |
| 35 | +<p><ins> |
| 36 | +-6- Let <code>sndr</code> and <code>env</code> be subexpressions |
| 37 | +such that <code>Sndr</code> is <code>decltype((sndr))</code>. If |
| 38 | +<code>sender-for<Sndr, affine_on_t></code> is <code>false</code>, then the expression |
| 39 | +<code>affine_on.transform_sender(sndr, env)</code> is ill-formed; otherwise, it |
| 40 | +is equivalent to: |
| 41 | +</ins> |
| 42 | +</p> |
| 43 | +<pre> |
| 44 | + <ins> |
| 45 | +auto [_, sch, child] = sndr; |
| 46 | +return transform_sender( |
| 47 | + <i>query-with-default</i>(get_domain, sch, default_domain()), |
| 48 | + continues_on(std::move(child), std::move(sch))); |
| 49 | +</ins> |
| 50 | +</pre> |
| 51 | +<p><ins>except that <code>sch</code> is only evaluated once. </ins></p> |
| 52 | +</blockquote> |
| 53 | +</p> |
| 54 | +</resolution> |
| 55 | + |
| 56 | +</issue> |
0 commit comments