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
thrust::identity<T> should eventually be replaced by cuda::std::identity. However, contrary to most other function objects, which have the same behavior in Thrust and libcu++, this is not straight forward, since thrust::identity<T> casts whatever argument it gets to const T&. Thus, at every use of thrust::identity<T> it has to be considered whether a cast is intended/required here.
The text was updated successfully, but these errors were encountered:
We can probably not replace it directly, since thrust::identity<T> performs a cast to T, whereas cuda::std::identity just forwards. But because this behavior is unexpected, we may want to add a function object that casts (with a different name) and deprecate (with eventual removal) thrust::identity.
We can probably not replace it directly, since thrust::identity<T> performs a cast to T, whereas cuda::std::identity just forwards. But because this behavior is unexpected, we may want to add a function object that casts (with a different name) and deprecate (with eventual removal) thrust::identity.
Or we just drop it regardless, and users who relied on the casting behavior should supply their own function object which performs a cast.
thrust::identity<T>
should eventually be replaced bycuda::std::identity
. However, contrary to most other function objects, which have the same behavior in Thrust and libcu++, this is not straight forward, sincethrust::identity<T>
casts whatever argument it gets toconst T&
. Thus, at every use ofthrust::identity<T>
it has to be considered whether a cast is intended/required here.The text was updated successfully, but these errors were encountered: