[only for discuss] Refactor: introduce explicit contexts for module_hs#7642
Open
goodchong wants to merge 5 commits into
Open
[only for discuss] Refactor: introduce explicit contexts for module_hs#7642goodchong wants to merge 5 commits into
goodchong wants to merge 5 commits into
Conversation
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.
I'm considering how to break down global variables like
globalc,globalv,param, andinputinto a series of struct variables.This is an experimental implementation request (PR) for community discussion.
The principles and ideas behind this PR are roughly as follows:
Don't modify the existing global variable system initially; instead, create a separate system to facilitate phased development. This new variable system will break down the original input variables into a series of smaller structs, categorized by type. These smaller structs are the smallest unit for passing variables between modules.
Pilot the new system in the module hs to demonstrate its effectiveness.
Pass the decomposed smaller struct variables as parameters to the module hs, replacing the global variables in the module hs.
Don't create separate options/context within the module hs, as I believe copying variables multiple times is a poor implementation approach.
What's changed?
ModuleContextdata model and C++11 builder that projects the existingInput_para,System_para,GlobalV, EXX, and restart state without replacing the legacy sources.Driverthe assembly root and freezeSimulationContextafter derived runtime initialization.source/source_io/module_hsand update all repository call sites to the new interfaces.Governance Notes
module_hsreceives only the small slices it consumes. Theksdft_lr_lcaospecial path now runs after context finalization.