-
Notifications
You must be signed in to change notification settings - Fork 127
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
[FEA]: Improve binary function objects and replace thrust implementation #1664
Comments
Hi, I am interested to work on this issue. However, I need further context to get started with it. Regarding replacing the thrust version with an alias declaration using cuda::std, should I be replacing this code template <typename T = void>
struct plus
{
typedef T first_argument_type;
typedef T second_argument_type;
typedef T result_type;
_CCCL_EXEC_CHECK_DISABLE
_CCCL_HOST_DEVICE constexpr T operator()(const T& lhs, const T& rhs) const
{
return lhs + rhs;
}
}; to use cuda::std::plus ? Thanks! |
Hey @srinivasyadav18, thanks for your interest in contributing to CCCL! You are correct. The basic idea would be to do the following: Before:
After:
|
Hi @jrhemstad, Thank you providing more context on the issue! I have replaced most of the function objects in thrust to use Also, the existing Can you please provide more insights on how to proceed with this issue ? Thanks! |
@miscco can you answer @srinivasyadav18's questions? |
@srinivasyadav18 That is indeed unfortunate. I would for now suggest to just ignore negate and keep them at is. We can move incrementally if we like |
@srinivasyadav18 how are you getting along? I could use your work, even if it's just partial :) |
Addresses part of: NVIDIA#1664
I opened a PR to enable the transparent functors (the |
Addresses part of: NVIDIA#1664
@bernhardmgruber Apologies for late response. I have replace most of function objects to use the ::cuda::std one's. But there are still lot more places where I need to remove the use of |
Addresses part of: NVIDIA#1664
Awesome! So your changes should not interfere with any of mine. Make sure to rebase on the latest tip of |
Addresses part of: NVIDIA#1664
Is this a duplicate?
Area
General CCCL
Is your feature request related to a problem? Please describe.
Currently the binary function objects like
cuda::std::plus
do not universally default their template argument in all standard modes:Furthermore those objects are duplicated in thrust.
Describe the solution you'd like
We should replace thrusts versions with an alias declaration and default the
cuda::std
ones universallyDescribe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: