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

Clean up hard-coded loop bounds #1461

Open
dmcdougall opened this issue Apr 30, 2024 · 1 comment
Open

Clean up hard-coded loop bounds #1461

dmcdougall opened this issue Apr 30, 2024 · 1 comment

Comments

@dmcdougall
Copy link
Contributor

Opening a ticket for dicussion/todo item.

The character of bugs such as the one fixed by #1459 can easily be avoided by not duplicating hard-coded constants. If QUDA is willing to chew a C++17 requirement, I think one can use std::size to retrieve the size of the input array arguments, store it in a variable, and re-use the variable.

@maddyscientist
Copy link
Member

We already have a C++17 requirement, so that's not a problem. Absolutely we should be removing hard-coded constants, though in general I think these quantities should be derived from parameters, rather than queried from size(). E.g., in #1459, the quantity 9 comes from nColor * nColor where nColor = 3.

Anyway, leaving this issue open, and we can close this when we eventually get around to this....

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

No branches or pull requests

2 participants