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

solve_cg: consistent RT casting #3638

Closed

Conversation

eebasso
Copy link
Contributor

@eebasso eebasso commented Nov 17, 2023

Summary

This PR makes sure that every instance in solve_cg of setting an RT variable to 0 or checking if it is equal to 0 uses the explicit RT(0.0) cast.

Additional background

This is similar to the PR made for solve_bicgstab.

{
ret = 1; break;
}
const RT alpha = rho/pw;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This restructuring of the divide by zero check allows alpha to be defined and declared in one line as a const RT instead of the current RT declaration.

@asalmgren
Copy link
Member

This is a small change for the sake of change; in the best interest of the developers' time we would like contributors to focus their efforts on fixing erroneous code (aka bugs) and contributing new functionality.

@asalmgren asalmgren closed this Mar 29, 2024
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.

2 participants