

def test_host_write(self, backend, elems, x, g):
    'Increment a global by the values of a Dat.'
    kernel = 'void k(unsigned int *x, unsigned int *g) { *g += *x; }'
    self.data[:] = 1
    g.data[:] = 0
    op2.par_loop(op2.Kernel(kernel, 'k'), elems, x(op2.READ), g(op2.INC))
    _nelems = elems.size
    assert (g.data[0] == _nelems)
    x.data[:] = 2
    g.data[:] = 0
    op2.par_loop(op2.Kernel(kernel, 'k'), elems, x(op2.READ), g(op2.INC))
    assert (g.data[0] == (2 * _nelems))

dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py TestDirectLoop.test_host_write/VarMisuse@24/78 `x`->`self`