예제 #1
0
 def f(x):
     laneId = jit.threadIdx.x & 0x1f
     if laneId < 16:
         x[laneId] = 1
     else:
         x[laneId] = 2
     jit.syncwarp()
예제 #2
0
 def f(x, m):
     laneId = jit.threadIdx.x & 0x1f
     if laneId < m:
         x[laneId] = 1
         jit.syncwarp(mask=m)