cuda::std::atomic<T> erroneously expects operator== when T > 8B
Open
libcu++
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
https://godbolt.org/z/5cPYbWTs8
An `atomic` shouldn't require an `operator==` to exist for `T` and should perform a bitwise equality comparison of the value representations.
The problem is here: https://github.com/NVIDIA/libcudacxx/blob/53be5e3a56b8fc044574f85fc361ae5e34a3ef6b/include/cuda/std/detail/libcxx/include/atomic#L869
This should be made to use something like this: https://github.com/NVIDIA/libcudacxx/blob/37802bece7d065152ba27d4846219739c7b1efb4/include/cuda/std/detail/libcxx/include/support/atomic/atomic_cuda.h#L405-L422
(though that code should be optimized)
Contributor guide
Assessment
This issue has not been assessed yet.