cupyx.jit.range

cupyx.jit.range(*args, unroll=None) = <cupyx.jit._builtin_funcs.RangeFunc object>

Range with loop unrolling support.

Parameters
  • start (int) – Same as that of built-in range.

  • stop (int) – Same as that of built-in range.

  • step (int) – Same as that of built-in range.

  • unroll (int or bool or None) –

    • If True, add #pragma unroll directive before the loop.

    • If False, add #pragma unroll(1) directive before the loop to disable unrolling.

    • If an int, add #pragma unroll(n) directive before the loop, where the integer n means the number of iterations to unroll.

    • If None (default), leave the control of loop unrolling to the compiler (no #pragma).

See also

#pragma unroll