def test_global_read(self, backend, elems, x, h):
        """Increment each value of a Dat by the value of a Global."""
        kernel_global_read = """
        void kernel_global_read(unsigned int* x, unsigned int* h) {
          (*x) += (*h);
        }"""
        op2.par_loop(op2.Kernel(kernel_global_read, "kernel_global_read"),
                     elems, x(op2.RW), h(op2.READ))
        _nelems = elems.size
        assert sum(x.data_ro) == _nelems * (_nelems + 1) / 2
dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py/TestDirectLoop.test_global_read/original