replace context macro usage with inline function calls#13
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Green-GPU to match the upstream change in green-utils where utils::context moved from a preprocessor macro to an inline function, requiring call sites to use utils::context().….
Changes:
- Replaced
utils::context.…/green::utils::context.…member access withutils::context().…/green::utils::context().…across GPU kernels and tests. - Updated MPI communicator/rank accesses (
global,global_rank,node_rank,internode_comm, etc.) to route through the newcontext()accessor.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/cu_solver_test.cpp | Updates context access in HDF5 read gating by node rank. |
| src/hf_gpu_kernel.cpp | Updates MPI barriers/reductions and rank checks to use utils::context(). |
| src/gw_gpu_kernel.cpp | Updates MPI barriers/reductions and rank checks to use utils::context(). |
| src/green/gpu/gw_gpu_kernel.h | Updates rank check in x2c GW constructor to use utils::context(). |
| src/green/gpu/gpu_kernel.h | Updates CUDA/MPI setup paths to use utils::context(). |
| src/gpu_kernel.cpp | Updates MPI device communicator setup to use utils::context(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
=======================================
Coverage 95.32% 95.32%
=======================================
Files 13 13
Lines 877 877
=======================================
Hits 836 836
Misses 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Update all
utils::context.call sites toutils::context().following the replacement of thecontextpreprocessor macro in green-utils with an inline function. Depends on Green-Phys/green-utils#5, Green-Phys/green-opt#8 and Green-Phys/green-sc#12