Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C build reorganisation #359

Open
daviesje opened this issue Mar 27, 2024 · 0 comments · Fixed by #417
Open

C build reorganisation #359

daviesje opened this issue Mar 27, 2024 · 0 comments · Fixed by #417
Assignees
Labels
context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch type: refactor Code refactoring / restyling for internal benefit

Comments

@daviesje
Copy link
Contributor

This issue is essentially mirror of #135 for the C backend. Currently the C backend is all compiled from GenerateICs.c which directly includes all of the .c and .h files sequentially, and specifically exposes everything in 21cmFAST.h and Globals.h to the python package. This makes it difficult to control dependencies between files, specify the scope of variables and functions, and will also make most linters fairly upset. We should reorganize the C backend to be separated into files with narrower scope (for example both ps.c and UsefulFunctions.c are way too broad at the moment), and we should define header files for each to control how they are shared amongst the backend.

We should discuss the specifics of what this will look like, but as the model grows it will become important that the codebase is easy to navigate and extend.

@daviesje daviesje added context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch type: refactor Code refactoring / restyling for internal benefit labels Mar 27, 2024
@daviesje daviesje mentioned this issue Aug 8, 2024
@daviesje daviesje linked a pull request Aug 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch type: refactor Code refactoring / restyling for internal benefit
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants