[BUG]: RLE doesn't support discard iterator
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 487
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 296
Description
### Is this a duplicate?
- [X] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this bug and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)
### Type of Bug
Compile-time Error
### Component
CUB
### Describe the bug
`cub::DeviceRunLengthEncode::Encode` doesn't work with `thrust::make_discard_iterator()`.
### How to Reproduce
```cpp
#include
#include
int main()
{
std::size_t temp_storage_bytes = 0;
std::uint8_t *d_temp_storage = nullptr;
int *d_in{}, *d_counts_out{}, *d_unique_out, *d_num_out;
cub::DeviceRunLengthEncode::Encode(d_temp_storage,
temp_storage_bytes,
d_in,
thrust::make_discard_iterator(), // d_unique_out,
d_counts_out,
d_num_out,
0);
}
```
```bash
cub/cub/thread/thread_operators.cuh(72): error: no instance of function template "cuda::std::__4::equal_to::operator()" matches the argument list
argument types are: (const thrust::THRUST_200200_890_NS::detail::any_assign, const thrust::THRUST_200200_890_NS::detail::any_assign)
object type is: cub::CUB_200200_890_NS::Equality
return !op(::cuda::std::forward(t), ::cuda::std::forward(u));
```
### Expected behavior
Successful compilation.
### Reproduction link
_No response_
### Operating System
_No response_
### nvidia-smi output
_No response_
### NVCC version
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.