-
Notifications
You must be signed in to change notification settings - Fork 447
Fix select if for mixed types #444
Fix select if for mixed types #444
Conversation
@senior-zero Sounds like this may also fix #406, can you confirm? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for jumping onto this so quickly, @senior-zero! LGTM. This will definitely help my use case. Given that the change also follows the behaviour we have in the prefix scan, I think it makes sense too. I'm curious if, originally, making InputIt::value_type
the internal_type
was a conscious decision and if there's rationale behind.
// The input value type | ||
using InputT = cub::detail::value_t<InputIteratorT>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 👍 I probably would have missed adjusting the tuning policies.
Yes, I confirm. After the fix, the code from #406 gets compiled. |
f52cfbb
to
94c3e1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- I'll start tests in a moment.
gpuCI: NVIDIA/thrust#1633 |
During three-way partitioning development I've noticed that there's a bug in the select if implementation. It used output type to load data from input iterator. Recently, @elstehle brought the very same issue. Here's a code sample that fails to compile. This fact limits the applicability of the partitioning/selection facilities:
This PR addresses this issue, allowing different value types for input and output iterators. It's worth mentioning that the implementation used to have correct types up to the following commit which doesn't contain any mentions of the value types in its description. So my guess whould be that it was a typo rather than an intent.
I've also noticed that the radix sort test fails to compile on windows. I've fixed a few conversion issues here.