

def test_wo(self, backend, elems, x):
    'Set a Dat to a scalar value with op2.WRITE.'
    kernel_wo = 'void kernel_wo(unsigned int* x) { *x = 42; }'
    op2.par_loop(op2.Kernel(kernel_wo, 'kernel_wo'), elems, x(op2.WRITE))
    assert all(map((lambda x: (x == 42)), x.data))

dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py TestDirectLoop.test_wo/original