---
id: pr-cccl-cub-6202
repo: NVIDIA/cccl
pr: 6202
title: '[Backport 3.1]: [CUB] Replace several direct uses of `__clz` (#6099)'
author: miscco
date: '2025-10-14'
url: https://github.com/NVIDIA/cccl/pull/6202
source_category: upstream-code
architectures:
- sm100
tags:
- warp
techniques:
- warp-specialization
hardware_features: []
kernel_types: []
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 30ae2aca9d54c51262f06e5ebce598562ceb884b
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- cub/cub/block/block_radix_rank.cuh
- cub/cub/warp/specializations/warp_reduce_shfl.cuh
- cub/cub/warp/specializations/warp_reduce_smem.cuh
- cub/cub/warp/specializations/warp_scan_shfl.cuh
- libcudacxx/include/cuda/std/__bit/countl.h
- libcudacxx/include/cuda/std/__bit/countr.h
- libcudacxx/include/cuda/std/__bit/reference.h
- thrust/thrust/detail/integer_math.h
artifact_dir: evidence/pull-bundles/cccl-cub/gh-6202
head_ref_oid: bbcc3341d432174d6fe09884f251847ac95db5de
---
# [Backport 3.1]: [CUB] Replace several direct uses of `__clz` (#6099)

- Repository: `NVIDIA/cccl`
- PR: [6202](https://github.com/NVIDIA/cccl/pull/6202)
- Decision: `Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.`
- Reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.

## Changed Paths

- `cub/cub/block/block_radix_rank.cuh`
- `cub/cub/warp/specializations/warp_reduce_shfl.cuh`
- `cub/cub/warp/specializations/warp_reduce_smem.cuh`
- `cub/cub/warp/specializations/warp_scan_shfl.cuh`
- `libcudacxx/include/cuda/std/__bit/countl.h`
- `libcudacxx/include/cuda/std/__bit/countr.h`
- `libcudacxx/include/cuda/std/__bit/reference.h`
- `thrust/thrust/detail/integer_math.h`

## Evidence Bundle

`evidence/pull-bundles/cccl-cub/gh-6202`
