@triton.jit
def fn(out_ptr0, rnumel, RBLOCK: tl.constexpr):
    rbase = tl.arange(0, RBLOCK)[None, :]
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        tmp3 = tl.where(rmask, 1, 0)
        tmp6 = tl.cumsum(tmp3, 1)
        tl.store(out_ptr0 + rindex, tmp6, rmask)
