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

Add inline files #206

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Add inline files #206

merged 3 commits into from
Sep 7, 2023

Conversation

boulderdaze
Copy link
Collaborator

Solver class has numerical implementation details that could be separated from the interface which makes the header files a little easier to read. There are two files that I worked on as a demo to discuss whether to have inl (inline) files separated from its header files.

@boulderdaze boulderdaze requested review from mattldawson and K20shores and removed request for mattldawson September 1, 2023 23:49
@mattldawson
Copy link
Collaborator

I like this. It does seem easier to read with the function definitions in a separate file, kind of like normal .cpp files but for templated classes/functions. Would it make sense to put these in a separate root folder, like inl/ or inline/, or maybe just in src/?

@boulderdaze
Copy link
Collaborator Author

The projects I've seen that maintain header-only library with additional inline files seem to put them in the same directory but I think we could put them in the separate directory such as /inl, or inline. One thing I've noticed that most of micm don't seem to need to separate header file from inline functions. It may only be applicable to a few with math-heavy header files.

@mattldawson
Copy link
Collaborator

That sounds good to me - let's keep the .inl files in the include/ folder if that's most commonly done.

@boulderdaze boulderdaze changed the title Draft: Add inline files Add inline files Sep 6, 2023
@boulderdaze boulderdaze marked this pull request as ready for review September 6, 2023 20:21
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 97.77% and no project coverage change.

Comparison is base (de9c3eb) 97.19% compared to head (ba5cd27) 97.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #206   +/-   ##
=======================================
  Coverage   97.19%   97.19%           
=======================================
  Files          28       29    +1     
  Lines        2427     2428    +1     
=======================================
+ Hits         2359     2360    +1     
  Misses         68       68           
Files Changed Coverage Δ
include/micm/solver/linear_solver.hpp 100.00% <ø> (ø)
include/micm/solver/state.inl 96.42% <96.42%> (ø)
include/micm/solver/rosenbrock.inl 96.65% <96.65%> (ø)
include/micm/solver/linear_solver.inl 100.00% <100.00%> (ø)
include/micm/solver/lu_decomposition.inl 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@boulderdaze boulderdaze merged commit 5d88637 into main Sep 7, 2023
15 checks passed
@boulderdaze boulderdaze deleted the add_inline_files branch September 7, 2023 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants