Skip to content

Conversation

@pciolkosz
Copy link
Contributor

The owning memory pool types are not copyable (for obvious reasons), but we require the resource to be copyable in any_resource and buffer. User needs to either pack the pool into shared_resource or pass it as a memory pool reference.

This PR adds a convenient API as_ref() to the owning memory pool types to opt-out of pool ownership when it's passed to an API. It's basically a static_cast<X_memory_pool_ref>(this).

I also added a test for constructing the buffer with shared_resource to show the two different approaches to custom memory pools

@pciolkosz pciolkosz requested a review from a team as a code owner December 6, 2025 01:29
@pciolkosz pciolkosz requested a review from fbusato December 6, 2025 01:29
@github-project-automation github-project-automation bot moved this to Todo in CCCL Dec 6, 2025
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Dec 6, 2025
@pciolkosz pciolkosz force-pushed the add_memory_pool_as_ref_helper_function branch from dbf72cc to 6ee566b Compare December 6, 2025 01:31
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🥳 CI Workflow Results

🟩 Finished in 56m 45s: Pass: 100%/91 | Total: 17h 01m | Max: 33m 14s | Hits: 98%/209618

See results here.

@pciolkosz pciolkosz merged commit bfb6172 into NVIDIA:main Dec 9, 2025
103 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants