Repository navigation
exec(fork_join): coalesce empty and unary calls - #2302
romintomasetti wants to merge 4 commits into
Conversation
|
@RobertLeahy @ericniebler Could you please have a look? Thanks! |
1a93249 to
376da8c
Compare
e910941 to
91e17da
Compare
91e17da to
e43b788
Compare
8881582 to
7d3ea15
Compare
|
needs a clang-format |
|
/ok to test a463493 |
|
We still need to fix the |
|
@ericniebler I'm not sure why this hasn't been detected earlier, but I had to modify how the stdexec/include/exec/fork_join.hpp Lines 168 to 180 in 5eee176 |
e171696 to
137e8fd
Compare
|
/ok to test 137e8fd |
|
Seems on MSVC my test did not work. I'll investigate on Monday. @maartenarnst Any though? Edit: Since the atomic increments are observable behavior, I tend to think that MSVC is not standard-conforming in this case. So probably best to opt for an |
I think your test is correct. The assertions together show that we take the value path and a counter reference is passed.
Confirmed! It looks like MSVC optimises away the move when it stores the object in the https://godbolt.org/z/cG81sYxfo When we add a member in the counter class or remove the "no unique address", the move appears. So the issue seems harmless in practice. Claude (Anthropic) helped with the analysis. |
a slight tweak of the reproducer causes the latest MSVC to ICE. i've filed that bug here: the right fix may be to give up trying to use EDIT: this looks related: https://developercommunity.microsoft.com/t/11160652 |
|
Should we just modify the test to something like this? It is clearly a compiler compliance issue that affects just this test, so I would put too much science into it and move on. #ifdef(MSVC)
// see report of Eric
CHECK(count.move == 0);
#else
CHECK(count.move ==1);
#endif |
Signed-off-by: romintomasetti <romin.tomasetti@gmail.com>
Similar to NVIDIA#2124. See P4269R1. Signed-off-by: romintomasetti <romin.tomasetti@gmail.com>
Signed-off-by: romintomasetti <romin.tomasetti@gmail.com>
137e8fd to
39c73f0
Compare
|
I've just filed the bug for the move constructor too: I've mentioned the bug report that @ericniebler had already filed and the related bug report. |
|
/ok to test 39c73f0 |
Signed-off-by: romintomasetti <romin.tomasetti@gmail.com>
39c73f0 to
0a604fc
Compare
exec::fork_join(sndr, clsr)is given a single closure, do no attempt to wrap it in the (thereby useless)fork_joinmachinery. Returnsndr | clsr.exec::fork_join(sndr)is given no closure, it behaves likesndr.As a drive-by, I've added a few
noexcepttothen.Similar to:
See P4269R1.