

def test_kernel_cplusplus(self, backend, delems):
    'Test that passing cpp=True to a Kernel works.'
    y = op2.Dat(delems, dtype=np.float64)
    backend.data[:] = (- 10.5)
    k = op2.Kernel('\n        #include <cmath>\n\n        void kernel(double *y)\n        {\n            *y = std::abs(*y);\n        }\n        ', 'kernel', cpp=True)
    op2.par_loop(k, y.dataset.set, y(op2.RW))
    assert (y.data == 10.5).all()

dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py TestDirectLoop.test_kernel_cplusplus/VarMisuse@31/58 `y`->`backend`