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