

def test_2d_read(self, backend, set, dat):
    kernel = '\n        void kernel_2d_read(int *x) { *x = myconstant[0] + myconstant[1]; }\n        '
    constant = op2.Const(2, (100, 200), dtype=numpy.int32, name='myconstant')
    op2.par_loop(op2.Kernel(kernel, 'kernel_2d_read'), set, dat(op2.WRITE))
    constant.remove_from_namespace()
    assert all((dat.data == set.data.sum()))

dataset/ETHPy150Open OP2/PyOP2/test/unit/test_constants.py TestConstant.test_2d_read/VarMisuse@82/147 `constant`->`set`