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
CTAD (deduction guides) for MDRangePolicy #5516
Conversation
Virtually all the builds are failing on the ORNL Jenkins CI server (does not compile) |
Retest this please |
Tests are all compile-time now. |
7b14994
to
9a7a4f9
Compare
7335167
to
919c31d
Compare
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.
Looks OK to me.
769b341
to
a4558ff
Compare
a4558ff
to
af1f94e
Compare
struct MDRangePolicy; | ||
|
||
// Note: If MDRangePolicy has a primary template, implicit CTAD (deduction | ||
// guides) are generated -> MDRangePolicy<> by some compilers, which is |
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.
just curious, which compilers do this?
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.
Implicit guides are generated from the primary template.
Because there are no template parameters to deduce in a parameter pack, both clang and gcc deduce a matching ctor to MDRangePolicy<>
, while nvcc will generate an error. Unfortunately, I find the standard wording on implicit guides to be fairly inscrutable (and cppreference doesn't help, as all it does is quote the standard) :-(. While I'd certainly like to know, practically speaking, it doesn't matter to us which one is correct, as we have to support all those compilers anyway.
Since MDRangePolicy always requires at least one template parameter (Rank
), any guides that deduce to MDRangePolicy<>
are just wrong.
TestMDRangePolicyCTAD.cpp
(as that isn't needed for compile time only tests) and associated cleanup
[[maybe_unused]] on ImplicitlyConvertibleToDefaultExecutionSpace::operator Kokkos::DefaultExecutionSpace() const by defining it and implicitly calling it in another [[maybe_unused]] static inline variable.
Fixed a comment
af1f94e
to
eea5079
Compare
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.
Looks OK to me. Maybe fix the double whitespace on the comments.
Old typing habits last forever... :-) |
Ignoring the one HIP failure. |
Refactoring #5319 into smaller P/Rs