def inc_y_z(): for i, j in x: a = ti.loop_unique(x[i, j]) y[a, j] += 1 z[i, i] += 1 # cannot demote this
def inc_y(): for i in x: a = ti.loop_unique(x[i]) y[a + 1] += 1
def inc_y(): for i in x: for j in range(i): a = ti.loop_unique(x[i]) y[a] += 1
def inc_y_z(): for i, j in ti.ndrange(a, b): u = ti.loop_unique(x[i, j]) y[u] += i z[i, j + 1] += 10 # TODO: demote this