[Scheduler] rename pdl to pdl_old to prepare #1531#1672
[Scheduler] rename pdl to pdl_old to prepare #1531#1672tdavidcl merged 2 commits intoShamrock-code:mainfrom
Conversation
Summary of ChangesHello @tdavidcl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a widespread refactoring by renaming two key methods, Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly renames pdl() to pdl_old() and get_layout_ptr() to get_layout_ptr_old() across numerous files. The changes are mostly consistent with the stated goal. However, there is an unintended functional change in ShamrockCtx.hpp that, while beneficial, should be in a separate PR. Additionally, widespread formatting changes have been introduced, likely by an auto-formatter, which should be separated from the renaming effort to maintain a clean commit history.
|
Thanks @tdavidcl for opening this PR! You can do multiple things directly here: Once the workflow completes a message will appear displaying informations related to the run. Also the PR gets automatically reviewed by gemini, you can: |
Workflow reportworkflow report corresponding to commit 79b7043 Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Clang-tidy diff reportSuggested changesDetailed changes :diff --git a/src/shamrock/include/shamrock/scheduler/ReattributeDataUtility.hpp b/src/shamrock/include/shamrock/scheduler/ReattributeDataUtility.hpp
index 18d9b396..db5f5891 100644
--- a/src/shamrock/include/shamrock/scheduler/ReattributeDataUtility.hpp
+++ b/src/shamrock/include/shamrock/scheduler/ReattributeDataUtility.hpp
@@ -130,31 +130,7 @@ namespace shamrock {
sycl::host_accessor nid{new_pid.get(current_pid), sycl::read_only};
- if (false) {
-
- const u32 cnt = pdat.get_obj_cnt();
-
- for (u32 i = cnt - 1; i < cnt; i--) {
- u64 new_pid = nid[i];
- if (current_pid != new_pid) {
-
- if (!part_exchange.has_key(current_pid, new_pid)) {
- part_exchange.add_obj(
- current_pid,
- new_pid,
- PatchDataLayer(sched.get_layout_ptr_old()));
- }
-
- part_exchange.for_each(
- [&](u64 _old_id, u64 _new_id, PatchDataLayer &pdat_int) {
- if (_old_id == current_pid && _new_id == new_pid) {
- pdat.extract_element(i, pdat_int);
- histogram_extract[current_pid]++;
- }
- });
- }
- }
- } else {
+ {
std::vector<u32> keep_ids;
std::unordered_map<u64, std::vector<u32>> extract_indexes;
Detailed changes :- src/shammodels/common/include/shammodels/common/setup/modifiers.hpp:139: warning: Member get_sum(PatchScheduler &sched, std::string name) (function) of namespace generic::setup::modifiers is not documented.
+ src/shammodels/common/include/shammodels/common/setup/modifiers.hpp:141: warning: Member get_sum(PatchScheduler &sched, std::string name) (function) of namespace generic::setup::modifiers is not documented.
- src/shammodels/common/include/shammodels/common/setup/modifiers.hpp:60: warning: Member set_value_in_sphere(PatchScheduler &sched, T val, std::string name, vec center, shambase::VecComponent< vec > radius) (function) of namespace generic::setup::modifiers is not documented.
+ src/shammodels/common/include/shammodels/common/setup/modifiers.hpp:61: warning: Member set_value_in_sphere(PatchScheduler &sched, T val, std::string name, vec center, shambase::VecComponent< vec > radius) (function) of namespace generic::setup::modifiers is not documented.
- src/shammodels/common/include/shammodels/common/setup/modifiers.hpp:97: warning: Member pertub_eigenmode_wave(PatchScheduler &sched, std::tuple< flt, flt > ampls, sycl::vec< flt, 3 > k, flt phase) (function) of namespace generic::setup::modifiers is not documented.
+ src/shammodels/common/include/shammodels/common/setup/modifiers.hpp:99: warning: Member pertub_eigenmode_wave(PatchScheduler &sched, std::tuple< flt, flt > ampls, sycl::vec< flt, 3 > k, flt phase) (function) of namespace generic::setup::modifiers is not documented.
- src/shammodels/sph/src/Model.cpp:709: warning: Compound BigDiscUtils is not documented.
- src/shammodels/sph/src/Model.cpp:711: warning: Member Tscal (typedef) of class BigDiscUtils is not documented.
- src/shammodels/sph/src/Model.cpp:712: warning: Member Out (typedef) of class BigDiscUtils is not documented.
+ src/shammodels/sph/src/Model.cpp:713: warning: Compound BigDiscUtils is not documented.
- src/shammodels/sph/src/Model.cpp:714: warning: Compound BigDiscUtils::DiscIterator is not documented.
+ src/shammodels/sph/src/Model.cpp:715: warning: Member Tscal (typedef) of class BigDiscUtils is not documented.
+ src/shammodels/sph/src/Model.cpp:716: warning: Member Out (typedef) of class BigDiscUtils is not documented.
+ src/shammodels/sph/src/Model.cpp:718: warning: Compound BigDiscUtils::DiscIterator is not documented.
- src/shammodels/sph/src/Model.cpp:737: warning: Member DiscIterator(Tvec center, Tscal central_mass, u64 Npart, Tscal r_in, Tscal r_out, Tscal disc_mass, Tscal p, Tscal H_r_in, Tscal q, Tscal G, std::mt19937 eng, std::function< Tscal(Tscal)> sigma_profile, std::function< Tscal(Tscal)> cs_profile, std::function< Tscal(Tscal)> rot_profile) (function) of class BigDiscUtils::DiscIterator is not documented.
+ src/shammodels/sph/src/Model.cpp:741: warning: Member DiscIterator(Tvec center, Tscal central_mass, u64 Npart, Tscal r_in, Tscal r_out, Tscal disc_mass, Tscal p, Tscal H_r_in, Tscal q, Tscal G, std::mt19937 eng, std::function< Tscal(Tscal)> sigma_profile, std::function< Tscal(Tscal)> cs_profile, std::function< Tscal(Tscal)> rot_profile) (function) of class BigDiscUtils::DiscIterator is not documented.
- src/shammodels/sph/src/Model.cpp:762: warning: Member is_done() (function) of class BigDiscUtils::DiscIterator is not documented.
- src/shammodels/sph/src/Model.cpp:764: warning: Member next() (function) of class BigDiscUtils::DiscIterator is not documented.
+ src/shammodels/sph/src/Model.cpp:766: warning: Member is_done() (function) of class BigDiscUtils::DiscIterator is not documented.
+ src/shammodels/sph/src/Model.cpp:768: warning: Member next() (function) of class BigDiscUtils::DiscIterator is not documented.
- src/shammodels/sph/src/Model.cpp:827: warning: Member next_n(u32 nmax) (function) of class BigDiscUtils::DiscIterator is not documented.
+ src/shammodels/sph/src/Model.cpp:831: warning: Member next_n(u32 nmax) (function) of class BigDiscUtils::DiscIterator is not documented.
- src/shamrock/include/shamrock/legacy/patch/interfaces/interface_handler_impl.hpp:86: warning: Member comm_interfaces_field(PatchScheduler &sched, PatchComputeField< T > &pcomp_field, std::vector< InterfaceComm< vectype > > &interface_comm_list, std::unordered_map< u64, std::vector< std::tuple< u64, std::unique_ptr< PatchDataField< T > > > > > &interface_field_map, bool periodic) (function) of namespace impl is not documented.
+ src/shamrock/include/shamrock/legacy/patch/interfaces/interface_handler_impl.hpp:91: warning: Member comm_interfaces_field(PatchScheduler &sched, PatchComputeField< T > &pcomp_field, std::vector< InterfaceComm< vectype > > &interface_comm_list, std::unordered_map< u64, std::vector< std::tuple< u64, std::unique_ptr< PatchDataField< T > > > > > &interface_field_map, bool periodic) (function) of namespace impl is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:100: warning: Member PatchScheduler(const std::shared_ptr< shamrock::patch::PatchDataLayerLayout > &pdl_ptr, u64 crit_split, u64 crit_merge) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:105: warning: Member dump_status() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:107: warning: Member dump_status() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:107: warning: Member update_local_load_value(std::function< u64(shamrock::patch::Patch)> load_function) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:109: warning: Member update_local_load_value(std::function< u64(shamrock::patch::Patch)> load_function) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:116: warning: Member get_box_tranform() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:118: warning: Member get_box_tranform() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:119: warning: Member get_box_volume() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:121: warning: Member get_box_volume() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:121: warning: Member should_resize_box(bool node_in) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:123: warning: Member should_resize_box(bool node_in) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:154: warning: Member make_patch_base_grid(std::array< u32, dim > patch_count) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:156: warning: Member make_patch_base_grid(std::array< u32, dim > patch_count) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:168: warning: Member format_patch_coord(shamrock::patch::Patch p) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:170: warning: Member check_patchdata_locality_corectness() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:170: warning: Member format_patch_coord(shamrock::patch::Patch p) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:172: warning: Member check_patchdata_locality_corectness() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:173: warning: Member dump_local_patches(std::string filename) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:175: warning: Member dump_local_patches(std::string filename) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:175: warning: Member gather_data(u32 rank) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:177: warning: Member gather_data(u32 rank) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:180: warning: PatchScheduler::add_root_patch has @param documentation sections but no arguments
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:182: warning: PatchScheduler::add_root_patch has @param documentation sections but no arguments
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:200: warning: Member sync_build_LB(bool global_patch_sync, bool balance_load) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:202: warning: Member sync_build_LB(bool global_patch_sync, bool balance_load) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:203: warning: Member get_patch_transform() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:205: warning: Member get_patch_transform() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:240: warning: Member for_each_patch(Function &&fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:242: warning: Member for_each_patch(Function &&fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:253: warning: Member for_each_global_patch(std::function< void(const shamrock::patch::Patch)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:255: warning: Member for_each_global_patch(std::function< void(const shamrock::patch::Patch)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:261: warning: Member for_each_local_patch(std::function< void(const shamrock::patch::Patch)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:263: warning: Member for_each_local_patch(std::function< void(const shamrock::patch::Patch)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:269: warning: Member for_each_local_patchdata(std::function< void(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:271: warning: Member for_each_local_patchdata(std::function< void(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:278: warning: Member for_each_local_patch_nonempty(std::function< void(const shamrock::patch::Patch &)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:280: warning: Member for_each_local_patch_nonempty(std::function< void(const shamrock::patch::Patch &)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:290: warning: Member get_patch_rank_owner(u64 patch_id) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:292: warning: Member get_patch_rank_owner(u64 patch_id) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:296: warning: Member for_each_patchdata_nonempty(std::function< void(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:298: warning: Member for_each_patchdata_nonempty(std::function< void(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:309: warning: Member map_owned_patchdata(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:311: warning: Member map_owned_patchdata(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:322: warning: Member distrib_data_local_to_all_simple(shambase::DistributedData< T > &src) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:324: warning: Member distrib_data_local_to_all_simple(shambase::DistributedData< T > &src) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:335: warning: Member distrib_data_local_to_all_load_store(shambase::DistributedData< T > &src) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:337: warning: Member distrib_data_local_to_all_load_store(shambase::DistributedData< T > &src) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:346: warning: Member map_owned_patchdata_fetch_simple(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:348: warning: Member map_owned_patchdata_fetch_simple(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:359: warning: Member map_owned_patchdata_fetch_load_store(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:361: warning: Member map_owned_patchdata_fetch_load_store(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:372: warning: Member map_owned_to_patch_field_simple(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:374: warning: Member map_owned_to_patch_field_simple(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:378: warning: Member map_owned_to_patch_field_load_store(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:380: warning: Member map_owned_to_patch_field_load_store(std::function< T(const shamrock::patch::Patch, shamrock::patch::PatchDataLayer &pdat)> fct) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:383: warning: Member get_rank_count() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:385: warning: Member get_rank_count() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:394: warning: Member get_total_obj_count() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:396: warning: Member get_total_obj_count() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:401: warning: Member rankgather_field(u32 field_idx) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:403: warning: Member rankgather_field(u32 field_idx) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:459: warning: Member compute_patch_field(Pfield &field, MPI_Datatype &dtype, Function &&lambda) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:461: warning: Member compute_patch_field(Pfield &field, MPI_Datatype &dtype, Function &&lambda) (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:477: warning: Member get_node_set_edge_patchdata_layer_refs() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:479: warning: Member get_node_set_edge_patchdata_layer_refs() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:498: warning: Member get_sim_box() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:500: warning: Member get_sim_box() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:500: warning: Member serialize_patch_metadata() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:502: warning: Member serialize_patch_metadata() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:80: warning: Member pdl() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:80: warning: Member pdl_old() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:82: warning: Member get_layout_ptr() const (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:84: warning: Member get_layout_ptr_old() const (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:94: warning: Member init_mpi_required_types() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:96: warning: Member free_mpi_required_types() (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:96: warning: Member init_mpi_required_types() (function) of class PatchScheduler is not documented.
- src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:98: warning: Member PatchScheduler(const std::shared_ptr< shamrock::patch::PatchDataLayerLayout > &pdl_ptr, u64 crit_split, u64 crit_merge) (function) of class PatchScheduler is not documented.
+ src/shamrock/include/shamrock/scheduler/PatchScheduler.hpp:98: warning: Member free_mpi_required_types() (function) of class PatchScheduler is not documented. |
…rock-code#1672) This PR rename pdl() to pdl_old() and get_layout_ptr() to get_layout_ptr_old(). Any other changes is not intended and should be reported.
This PR rename pdl() to pdl_old() and get_layout_ptr() to get_layout_ptr_old().
Any other changes is not intended and should be reported.