-
Notifications
You must be signed in to change notification settings - Fork 170
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
Use a more efficient enable_if_t
implementation
#3071
base: main
Are you sure you want to change the base?
Conversation
1dff3db
to
77af435
Compare
typename enable_if<_CCCL_TRAIT(is_convertible, const remove_const_t<_IntegralTypes>&, index_type), int>::type = 0, | ||
typename enable_if<_CCCL_TRAIT(is_nothrow_constructible, index_type, const remove_const_t<_IntegralTypes>&), | ||
int>::type = 0> |
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.
Q: Why isn't this using enable_if_t
? What bug is worked around here?
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.
Yeah layout_stride cannot deduce its arguments if we use the enable_if_t 🤷
That said, we seem to have more issues like 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.
Sad. Consider adding a comment for those cases, so nobody is tempted to rewrite a enable_if<...>::type
into enable_if_t
and needs a whole CI run to find out it's a bug.
🟨 CI finished in 1h 43m: Pass: 94%/168 | Total: 3d 03h | Avg: 26m 58s | Max: 1h 15m | Hits: 71%/17422
|
Project | |
---|---|
CCCL Infrastructure | |
+/- | libcu++ |
CUB | |
Thrust | |
CUDA Experimental | |
python | |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
+/- | libcu++ |
+/- | CUB |
+/- | Thrust |
+/- | CUDA Experimental |
+/- | python |
+/- | CCCL C Parallel Library |
+/- | Catch2Helper |
🏃 Runner counts (total jobs: 168)
# | Runner |
---|---|
124 | linux-amd64-cpu16 |
19 | linux-amd64-gpu-v100-latest-1 |
15 | windows-amd64-cpu16 |
10 | linux-arm64-cpu16 |
This optimizes our
enable_if_t
implementation, which is one of the most commonly used types in the whole repositoryRather than instantiating a type for every occurence we instantiate the type only twice