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

Remove dead code in crout #3060

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove dead code in crout #3060

wants to merge 1 commit into from

Conversation

JCGoran
Copy link
Contributor

@JCGoran JCGoran commented Aug 27, 2024

The if (0) part should never execute. For reference, the first occurrence of it seems to be this commit: d5d03af

Copy link

sonarcloud bot commented Aug 27, 2024

Copy link

✔️ b20be94 -> Azure artifacts URL

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.26%. Comparing base (4844029) to head (b20be94).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3060   +/-   ##
=======================================
  Coverage   67.26%   67.26%           
=======================================
  Files         571      571           
  Lines      104885   104887    +2     
=======================================
+ Hits        70550    70552    +2     
  Misses      34335    34335           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JCGoran JCGoran marked this pull request as ready for review August 28, 2024 07:50
@1uc
Copy link
Collaborator

1uc commented Aug 29, 2024

I'm not opposed to cleaning this up. However, a disadvantage of removing the upper branch is that now the function is strange in that it kinda pretends that it has certain permutation functionality (via y) when in fact the implementation makes to attempt at supporting that case.

The existing has the advantage that it shows what should be happening if y where passed in. However, it misleads us to believe that ignoring y is fine.

I feel this is a place where commenting the code might help. Something that explains that y is never used and must be a nullptr, but the fact can't be asserted, because when using pgacc, the pointer is spuriously non-null.

Or one could continue one step further and remove the argument y from the function signature.

@@ -132,56 +132,29 @@ inline void nrn_scopmath_solve_thread(int n,
int* y,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int* y,
int* /* y */,

given the large number of macros, it's very hard to know if y is really used or not.

Comment on lines +146 to +149
/*
* Note that the y vector is already in the correct order for back
* substitution. Perform back substitution, pivoting the matrix but not
* the y vector. There is no need to divide by the diagonal element as
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't figure out what these sentences what to convey. Maybe they should be updated along with the doc string of the function.

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