Skip to main content

Mojo function

ufloordiv

ufloordiv(a: Int, b: Int) -> Int

Perform unsigned floor division (//) on Int arguments.

This function treats both arguments as unsigned values and performs unsigned division, which is faster than signed division on NVIDIA GPUs.

For correctness, both arguments should be non-negative integers.

Args:

  • a (Int): The dividend (treated as unsigned).
  • b (Int): The divisor (treated as unsigned).

Returns:

Int: The quotient of unsigned division.

Was this page helpful?