Is this a duplicate?
Area
libcu++
Is your feature request related to a problem? Please describe.
@nanan-nvidia discovered that the CUDA intrinsic __fns performance was a bottleneck for RLE optimization.
He proposed an optimized version based on binary search.
Describe the solution you'd like
Generalization of Find the position of the n-th set provided in https://github.com/NVIDIA/cccl/blob/main/cub/cub/device/dispatch/kernels/kernel_rle_encode_lookahead.cuh#L198 that works with all (unsigned) integral types
Potentially considering further optimizations, e.g. Select the bit position in https://graphics.stanford.edu/~seander/bithacks.html
and CPU instructions x86 BMI2 PEXT or Arm SVE2 BEXT
Describe alternatives you've considered
No response
Additional context
No response
Is this a duplicate?
Area
libcu++
Is your feature request related to a problem? Please describe.
@nanan-nvidia discovered that the CUDA intrinsic
__fnsperformance was a bottleneck for RLE optimization.He proposed an optimized version based on binary search.
Describe the solution you'd like
Generalization of Find the position of the n-th set provided in https://github.com/NVIDIA/cccl/blob/main/cub/cub/device/dispatch/kernels/kernel_rle_encode_lookahead.cuh#L198 that works with all (unsigned) integral types
Potentially considering further optimizations, e.g.
Select the bit positionin https://graphics.stanford.edu/~seander/bithacks.htmland CPU instructions x86 BMI2
PEXTor Arm SVE2BEXTDescribe alternatives you've considered
No response
Additional context
No response