Skip to content

exec::stopped_by - #2346

Open
RobertLeahy wants to merge 5 commits into
NVIDIA:mainfrom
RobertLeahy:p4394_20261017
Open

RobertLeahy wants to merge 5 commits into
NVIDIA:mainfrom
RobertLeahy:p4394_20261017

Conversation

@RobertLeahy

@RobertLeahy RobertLeahy commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds:

  • exec::stopped_by from P4390R0
  • storage_for_completion_signatures and matching_completion_signatures_t from P4288R2 (sans reflection) which are required for the above

Also adds a missing include.

@copy-pr-bot

copy-pr-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread include/exec/stopped_by.hpp Outdated
Comment thread include/exec/stopped_by.hpp
Comment thread include/exec/stopped_by.hpp Outdated
Comment thread include/exec/stopped_by.hpp Outdated
Comment thread test/stdexec/types/test_matching_completion_signature.cpp

@ispeters ispeters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borat_very_nice.jpg

@RobertLeahy
RobertLeahy force-pushed the p4394_20261017 branch 3 times, most recently from 06f2452 to 40db327 Compare October 19, 2026 00:02
Several headers in exec depend on __storage.hpp.
Allows for template arguments deduced from a completion, for example in:

  template<typename... Args>
  void set_value(Args&&...);

To be used to determine which completion signature such a completion
corresponds to.

See P4288.
Provides a turnkey, reference-aware way to store completion signatures
for later examination or transmission.

See P4288.

Note that this implementation diverges from the implementation described
in P4288. In order to remain device compatible this implementation
stores a __tuple rather than a std::tuple. Therefore
storage_for_completion_signature::arguments cannot be provided (since it
returns a reference to the directly stored std::tuple, which doesn't
exist in this implementation).

Moreover to support algorithms which aim to be usable on host and device
the implementation in this commit provides both
storage_for_completion_signature::forward_arguments and
::__forward_arguments where the latter returns a __tuple and can
therefore be marked as being device compatible.
Implements stopped_by from P4390R0.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants