jax.lax.clz#
- jax.lax.clz(x)[source]#
Elementwise count-leading-zeros.
This function lowers directly to the stablehlo.count_leading_zeros operation.
- Parameters:
x (ArrayLike) – Input array. Must have integer dtype.
- Returns:
An array of the same shape and dtype as
x
, containing the number of set bits in the input.- Return type:
See also
jax.lax.population_count()
: Count the number of set bits in each element.