You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Detect address stability in thrust::transform for generic known function objects #2799
thrust::transform can take a better code path if it knows that the transformation function is not relying on the address of its arguments. We can detect this for generic/transparent function objects (e.g. thrust::plus<void>) by detecting that:
the function object is a known generic/transparent function object. We thus know it's behavior and the signature of operator().
the argument types (which we can infer from the iterator value types) cannot have an operator+() etc. that could rely on the address. this holds for built-in and known types like float or thrust::complex<float>.
changed the title [-]Detect address stability for transparent known function objects[/-][+]Detect address stability in `thrust::transform` for transparent known function objects[/+]on Nov 13, 2024
changed the title [-]Detect address stability in `thrust::transform` for transparent known function objects[/-][+]Detect address stability in `thrust::transform` for generic known function objects[/+]on Nov 13, 2024
This will become irrelevant once we provide cuda::std::transform which does not promise address stability. If time permits, we could implement better detection here, but I guess our time is better spent elsewhere.
I'll leave the issue open until we have cuda::std::transform.
Activity
[-]Detect address stability for transparent known function objects[/-][+]Detect address stability in `thrust::transform` for transparent known function objects[/+][-]Detect address stability in `thrust::transform` for transparent known function objects[/-][+]Detect address stability in `thrust::transform` for generic known function objects[/+]bernhardmgruber commentedon Jan 16, 2026
This will become irrelevant once we provide
cuda::std::transformwhich does not promise address stability. If time permits, we could implement better detection here, but I guess our time is better spent elsewhere.I'll leave the issue open until we havecuda::std::transform.bernhardmgruber commentedon Feb 27, 2026
Made irrelevant by
cuda::std::transform.