-
Notifications
You must be signed in to change notification settings - Fork 182
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
thrust fancy iterators should be trivially copy constructible #1367
Comments
miscco
added a commit
to miscco/cccl
that referenced
this issue
Feb 12, 2024
… when possible Our implementation provides user defined copy constructors, even if that is not necessary, as this was necessary prior to C++11. Having dropped any support for older standard dialects, we can simply rely on defaulting or even better omitting those copy constructors. This ensures that thrust fany iterators are trivially_copy_constructible when possible. I did not rework transform_iterator, as that would require considerable effort due to potentially non copy assignable functors. Addresses NVIDIA#1367
miscco
added a commit
that referenced
this issue
Feb 14, 2024
… when possible (#1368) Our implementation provides user defined copy constructors, even if that is not necessary, as this was necessary prior to C++11. Having dropped any support for older standard dialects, we can simply rely on defaulting or even better omitting those copy constructors. This ensures that thrust fany iterators are trivially_copy_constructible when possible. I did not rework transform_iterator, as that would require considerable effort due to potentially non copy assignable functors. Addresses #1367
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #562
Originally posted by pauleonix October 14, 2023
I am working on a existing CUDA C++ codebase that combines Thrust fancy iterators with eyalroz/cuda-api-wrappers. In recent versions these wrappers have started statically checking the (decayed) type of kernel arguments passed through it's API for
std::is_trivially_copyable
or even more recentlystd::is_trivially_copy_constructible
. Neither of these requirements is met by Thrust fancy iterators like even the most basicthrust::counting_iterator<int>
. As the two of us couldn't reach a conclusion or our own in eyalroz/cuda-api-wrappers#551, we decided to ask here if there is another option to check for correctness without compromising composability with Thrust fancy iterators.The text was updated successfully, but these errors were encountered: