clean up some allocator and memory utilities#6939
Merged
ericniebler merged 2 commits intoNVIDIA:mainfrom Dec 10, 2025
Merged
Conversation
* replace use of enable_if with concepts portability macros and `if constexpr` * replace conditional compilation of calls to `construct_at` and `destroy_at` with calls to `__construct_at` and `__destroy_at` * suppress deprecation warnings that `cuda::std::allocator` is triggering on itself.
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test 9184a30 |
Contributor
Author
|
/ok to test 7560ec1 |
davebayer
approved these changes
Dec 10, 2025
Contributor
🥳 CI Workflow Results🟩 Finished in 2h 27m: Pass: 100%/91 | Total: 1d 19h | Max: 1h 50m | Hits: 82%/204100See results here. |
miscco
reviewed
Dec 11, 2025
Comment on lines
+106
to
+107
| _CCCL_TEMPLATE(class _Tp, class... _Args) | ||
| _CCCL_REQUIRES(is_constructible_v<_Tp, _Args...>) |
Contributor
There was a problem hiding this comment.
We should change that in all overloads and __construct_at
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.
Description
while working on #5975, i found it necessary to make a few small changes to libcudacxx's allocator machinery, mostly to work around MSVC compiler bugs. this PR collects those changes into one package.
enable_ifwith concepts portability macros andif constexprconstruct_atanddestroy_atwith calls to__construct_atand__destroy_atcuda::std::allocatoris triggering on itself.Checklist