예제 #1
0
 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
예제 #2
0
 def inc_y():
     for i in x:
         a = ti.loop_unique(x[i])
         y[a + 1] += 1
예제 #3
0
 def inc_y():
     for i in x:
         for j in range(i):
             a = ti.loop_unique(x[i])
             y[a] += 1
예제 #4
0
 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