Repository navigation
[libcu++] Make memory resources work with get_memory_resource when wrapped in environment - #8404
Merged
pciolkosz merged 3 commits intoApr 22, 2026
Merged
Conversation
miscco
requested changes
Apr 14, 2026
| //! This enables the resource to be discovered inside a composed | ||
| //! `cuda::std::execution::env` by the `get_memory_resource` customization point. | ||
| template <class _Derived> | ||
| struct memory_resource_base |
Contributor
There was a problem hiding this comment.
I feel this is overkill. It would be much better to just add the query to the individual resources
This comment has been minimized.
This comment has been minimized.
gonidelis
self-requested a review
April 15, 2026 00:52
miscco
approved these changes
Apr 20, 2026
pciolkosz
force-pushed
the
get_memory_resource_for_resources
branch
from
April 20, 2026 23:23
25dde91 to
e157292
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
🥳 CI Workflow Results🟩 Finished in 1d 19h: Pass: 100%/321 | Total: 2d 21h | Max: 55m 05s | Hits: 98%/409798See results here. |
bernhardmgruber
pushed a commit
to bernhardmgruber/cccl
that referenced
this pull request
Apr 23, 2026
…apped in environment (NVIDIA#8404) * Make anything that satisfies a resource concept work with get_memory_resource query * Add memory_resource_base * Fix clang-tidy
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now when an API takes an environment, in order to use
get_memory_resourceon that environment it needs to be wrapped incuda::std::execution::prop. It would be nice to put the resource directly into it, to make it work this PR adds a CRTP base class for resources that implementsquery(get_memory_resource)that allows it to work with the environment machinery.