Skip to content

Conversation

@ispeters
Copy link

@ispeters ispeters commented Dec 14, 2025

This PR will implement P3149R11 patched with P3815R1.

  • [exec.scope.concepts]
    • concept scope_association
    • concept scope_token
  • [exec.associate]
    • associate algorithm
  • [exec.stop.when]
    • stop-when algorithm
  • [exec.spawn]
    • spawn algorithm
  • [exec.spawn.future]
    • spawn_future algorithm
  • [exec.counting.scopes]
    • simple_counting_scope
    • counting_scope

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 14, 2025

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.

@ericniebler
Copy link
Collaborator

/ok to test fd9d04b

@ispeters
Copy link
Author

ispeters commented Dec 16, 2025

The latest push includes an implementation of stdexec::associate with some tests, but the tests are incomplete so I haven't marked associate as done in the summary.

I have also tried to address the build failures on the previous iteration, but I don't have a local test environment for the failing build types so I haven't tested the fixes locally, other than to confirm that they still build with my local Clang (i.e. Homebrew clang version 21.1.7).

@ispeters
Copy link
Author

Rebased on #1717.

@ispeters ispeters force-pushed the p3149_plus_p3815 branch 2 times, most recently from 96d4661 to f786c00 Compare December 22, 2025 06:42
@ericniebler
Copy link
Collaborator

/ok to test f786c00

@ispeters ispeters force-pushed the p3149_plus_p3815 branch 3 times, most recently from 67262ee to 97d79ee Compare December 23, 2025 21:08
@ericniebler
Copy link
Collaborator

/ok to test 97d79ee

@ispeters
Copy link
Author

I managed to get GCC 12 installed on my Mac and it repro'd the ICE and the build failure in test_stop_when.cpp; I think I've addressed the build failures in GCC, nvcc, and MSVC.

@ispeters ispeters force-pushed the p3149_plus_p3815 branch 2 times, most recently from 52e1755 to 521d849 Compare December 24, 2025 08:06
@ispeters
Copy link
Author

simple_counting_scope still needs more tests, but I did discover that [exec.simple.counting.mem], paragraph 9 has a bug: we need to move the scope to the joined state and return true if count is zero, regardless of the value of state.

@ericniebler
Copy link
Collaborator

/ok to test cc867f4

@ispeters ispeters force-pushed the p3149_plus_p3815 branch 2 times, most recently from a1dd153 to 9263dab Compare December 25, 2025 07:32
@ispeters
Copy link
Author

I think I've fixed the build breaks in old gcc, nvc++, and MSVC. Getting a repro of the gcc 11 builds was quite a pain—I can't figure out how to get gcc 11 to run properly on macOS Tahoe so I had to use container, which I learned about here. Fixing MSVC is a matter of guessing. I can't run nvc++ on my Mac, but it turns out it's available on Godbolt, and this was very helpful.

I've updated __counting_scopes.hpp rather extensively; I renamed some of the variables in simple_counting_scope to make the naming more consistent, and I've thoroughly documented both the paragraphs in the standard being implemented and my justifications for weaker-than-seq_cst memory orderings.

@ispeters
Copy link
Author

Pull the guts of simple_counting_scope into a __base_scope and implement both simple_counting_scope and counting_scope in terms of it.

@ispeters
Copy link
Author

Do some template hoisting and renaming, and replace a single virtual function with a function pointer to cut down on RTTI.

@ericniebler
Copy link
Collaborator

/ok to test e6db1ed

@ispeters
Copy link
Author

I can't seem to make Godbolt make stdexec available to MSVC, but this suggests the Clangs, gccs, and nvccs of the world are happy with the current iteration.

@ericniebler
Copy link
Collaborator

/ok to test ea4a34d

@ispeters
Copy link
Author

Reflect the file rename in CMakeLists.txt.

@ericniebler
Copy link
Collaborator

/ok to test 98aafef

This diff adds a definition for `concept stdexec::scope_association`
plus tests confirming it accepts and rejects the expected things.
This diff adds a definition for `concept stdexec::scope_token` plus
tests confirming it accepts and rejects the expected things.
This diff defines `stdexec::associate` and adds some initial tests to
confirm it works properly. Still a work in progress.
This diff defines `stdexec::__stop_when` as the implementation of
_`stop-when`_ and adds tests to validate the algorithm.
This diff adds `stdexec::spawn` and its tests.
This diff adds `stdexec::simple_counting_scope` and
`stdexec::counting_scope` plus tests for both. The tests found a spec
bug that's been filed as an LWG issue.
@ispeters
Copy link
Author

Add spawn_future and rebase on #1682.

This diff adds `stdexec::spawn_future` and some basic tests.
@ericniebler
Copy link
Collaborator

/ok to test 4717c70

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