PODVector: Add _default Platform Aliases#540
Merged
ax3l merged 4 commits intoAMReX-Codes:developmentfrom Mar 2, 2026
Merged
Conversation
2 tasks
432d037 to
64d6673
Compare
Register `PODVector_{real,int,uint64}_default` as aliases that
resolve to `_std` on CPU builds and `_arena` on GPU builds,
matching the C++ `Gpu::DeviceVector<T>` type per platform.
This helps to write CPU/GPU agnostic interfaces, e.g., in
BLAST-ImpactX/impactx#1305
64d6673 to
3e09aef
Compare
ax3l
added a commit
to ax3l/impactx
that referenced
this pull request
Mar 2, 2026
505104c to
046a43d
Compare
ax3l
added a commit
to ax3l/impactx
that referenced
this pull request
Mar 3, 2026
Member
Author
|
What I actually meant with this PR is Maybe should rename them in a follow-up to make it clearer: #545 |
ax3l
added a commit
to ax3l/pyamrex
that referenced
this pull request
Mar 4, 2026
Follow-up to AMReX-Codes#540, renaming the `PODVector_{real,int,uint64}_default` to `DeviceVector_{real,int,uint64}` et al. Implement the aliases for `AMReX_GpuContainers.H`
ax3l
added a commit
to ax3l/pyamrex
that referenced
this pull request
Mar 4, 2026
Follow-up to AMReX-Codes#540, renaming the `PODVector_{real,int,uint64}_default` to `DeviceVector_{real,int,uint64}` et al. Implement the aliases for `AMReX_GpuContainers.H`
cemitch99
pushed a commit
to BLAST-ImpactX/impactx
that referenced
this pull request
Mar 6, 2026
* Fix: Python Wake Tests on GPU Ensure the CSR wake Python tests work also on GPU. * Use new `PODVector_*_default` See AMReX-Codes/pyamrex#540
ax3l
added a commit
to ax3l/pyamrex
that referenced
this pull request
Apr 5, 2026
Follow-up to AMReX-Codes#540, renaming the `PODVector_{real,int,uint64}_default` to `DeviceVector_{real,int,uint64}` et al. Implement the aliases for `AMReX_GpuContainers.H`
ax3l
added a commit
to ax3l/pyamrex
that referenced
this pull request
Apr 5, 2026
Follow-up to AMReX-Codes#540, renaming the `PODVector_{real,int,uint64}_default` to `DeviceVector_{real,int,uint64}` et al. Implement the aliases for `AMReX_GpuContainers.H`
ax3l
added a commit
to ax3l/pyamrex
that referenced
this pull request
Apr 6, 2026
Follow-up to AMReX-Codes#540, renaming the `PODVector_{real,int,uint64}_default` to `DeviceVector_{real,int,uint64}` et al. Implement the aliases for `AMReX_GpuContainers.H`
ax3l
added a commit
that referenced
this pull request
Apr 6, 2026
Follow-up to #540, renaming the `PODVector_{real,int,uint64}_default` to `DeviceVector_{real,int,uint64}` et al. Implement the aliases for `AMReX_GpuContainers.H` - [x] resolve inconsistency mentioned in AMReX-Codes/amrex#5123 --------- Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja>
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.
Update: Renamed what was added here in PR #545.
What I actually meant with this PR is
amrex::Gpu::DeviceVector<amrex::Real>. When Cuda is off, all these containers revert toamrex::Gpu::PODVector.https://github.com/AMReX-Codes/amrex/blob/26.03/Src/Base/AMReX_GpuContainers.H#L23-L24
https://github.com/AMReX-Codes/amrex/blob/26.03/Src/Base/AMReX_GpuContainers.H#L79-L81
Register
PODVector_{real,int,uint64}_defaultas aliases that resolve to_stdon CPU builds and_arenaon GPU builds, matching the C++Gpu::DeviceVector<T>type per platform.For other containers like PC & MF we an just use the default arena, but PODVector is implemented a bit special, relying on a
std::allocatorinstead of the default arena on CPU.This helps to write CPU/GPU agnostic interfaces, e.g., in BLAST-ImpactX/impactx#1305