-
Notifications
You must be signed in to change notification settings - Fork 915
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
[Review] Correct unused parameter warnings in rolling algorithms #8390
[Review] Correct unused parameter warnings in rolling algorithms #8390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a good/better practice to use Type /*variable_name*/
instead of removing the unused variable name entirely. Having the name there will let us a better hint about what is sitting at the parameter position.
I don't mind updating the approach but it would be great to have a consistent style. When I brought this up on slack people wanted me to drop the unused names so they can't go out of sync, so that is what I used for both of the open PR's and #8239, and #8232 |
Does NVCC respect the C++17 ``[[maybe_unused]]` attribute? https://en.cppreference.com/w/cpp/language/attributes/maybe_unused |
I think it should, as C++ standard is the same for both host and device code compilation. |
This warning is generated by a component of the CUDA compiler unconditionally when invoked independent of the standard level, or if the code is host or device. In addition this component currently doesn't respect any So for now we have to jump through these hoops. |
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #8390 +/- ##
===============================================
Coverage ? 82.84%
===============================================
Files ? 109
Lines ? 17913
Branches ? 0
===============================================
Hits ? 14840
Misses ? 3073
Partials ? 0 Continue to review full report at Codecov.
|
@gpucibot merge |
Starting in CUDA 11.3, nvcc will start to unconditionally warn about unused parameters on functions/methods that are in anonymous namespaces.