-
Notifications
You must be signed in to change notification settings - Fork 167
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
implement C++26 std::ignore
#2922
Conversation
libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.general/ignore.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.general/ignore.pass.cpp
Outdated
Show resolved
Hide resolved
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.
Some nitpicks
libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.general/ignore.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.general/ignore.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.general/ignore.pass.cpp
Outdated
Show resolved
Hide resolved
/ok to test |
🟨 CI finished in 2h 40m: Pass: 98%/396 | Total: 9d 05h | Avg: 33m 33s | Max: 1h 20m | Hits: 43%/21919
|
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: 396)
# | Runner |
---|---|
327 | linux-amd64-cpu16 |
28 | linux-arm64-cpu16 |
26 | linux-amd64-gpu-v100-latest-1 |
15 | windows-amd64-cpu16 |
/ok to test |
🟨 CI finished in 3h 07m: Pass: 98%/396 | Total: 9d 12h | Avg: 34m 37s | Max: 1h 23m | Hits: 32%/22042
|
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: 396)
# | Runner |
---|---|
327 | linux-amd64-cpu16 |
28 | linux-arm64-cpu16 |
26 | linux-amd64-gpu-v100-latest-1 |
15 | windows-amd64-cpu16 |
/ok to test |
this makes `__ignore_t` a trivial class type
#include <cuda/std/cassert> | ||
#include <cuda/std/tuple> | ||
|
||
#include "test_macros.h" | ||
|
||
static_assert(cuda::std::is_trivial<decltype(cuda::std::ignore)>::value, ""); |
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.
for the record, is_trivial
is almost never what you want, and in fact the whole notion of trivial types in the standard is going away. typically what you really want is either is_trivially_copyable
or is_trivially_constructible
or both.
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.
This is taken from libc++
. I tried to find out if it is actually required to be trivial by the standard but I didn't find anything said about it. libstdc++
does not even implement this check in their tests, but the implementated type is trivial.
The most important thing is that it is trivially default constructible. I would change the check to is_trivially_default_constructible
if you agree.
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.
I would like to have the is_trivially_default_constructible
and an is_empty
check
There is a problem with NVCC and NVRTC recognizing the assignment to But I cannot find any simple solution different than suppress this warning globally as I did not find a way to "fake an effect". Any ideas? |
I've found out that this error is emitted when the From host compilers, only MSVC seems to have problems using constant globals in constexpr context. But in host code, the |
Try marking |
/ok to test |
🟨 CI finished in 1h 52m: Pass: 98%/396 | Total: 9d 06h | Avg: 33m 42s | Max: 1h 40m | Hits: 45%/22042
|
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: 396)
# | Runner |
---|---|
327 | linux-amd64-cpu16 |
28 | linux-arm64-cpu16 |
26 | linux-amd64-gpu-v100-latest-1 |
15 | windows-amd64-cpu16 |
This does not solve the problem because before CUDA 11,3 the macro expands to |
Sorry, I was a bit brain-afk in the morning and only saw that your snippet on godbolt did not have the macro. |
I've disabled assignment to |
/ok to test |
🟩 CI finished in 1h 44m: Pass: 100%/396 | Total: 9d 00h | Avg: 32m 50s | Max: 1h 22m | Hits: 45%/22094
|
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: 396)
# | Runner |
---|---|
327 | linux-amd64-cpu16 |
28 | linux-arm64-cpu16 |
26 | linux-amd64-gpu-v100-latest-1 |
15 | windows-amd64-cpu16 |
Implementation of P2968R2 "Make std::ignore a first-class object" from C++26.