From dbe19deb0d42ee7c2359d951686c6100d4ec27b3 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 16 Jan 2020 22:20:27 +0100 Subject: Integrate SSS in Open(C,G)L interop example --- lid_driven_cavity/opencl_gl_interop/SSS.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lid_driven_cavity/opencl_gl_interop/SSS.py (limited to 'lid_driven_cavity/opencl_gl_interop/SSS.py') diff --git a/lid_driven_cavity/opencl_gl_interop/SSS.py b/lid_driven_cavity/opencl_gl_interop/SSS.py new file mode 100644 index 0000000..a8f5a37 --- /dev/null +++ b/lid_driven_cavity/opencl_gl_interop/SSS.py @@ -0,0 +1,18 @@ +import pyopencl as cl + +from common import MomentsTextureBase + +from lattice.SSS import Lattice + +class MomentsTexture(MomentsTextureBase): + pass + + def collect(self): + cl.enqueue_acquire_gl_objects(self.lattice.queue, [self.cl_gl_moments]) + + self.lattice.program.collect_moments_to_texture( + self.lattice.queue, + self.lattice.geometry.size(), + self.lattice.layout, + self.lattice.memory.cl_control, + self.cl_gl_moments) -- cgit v1.2.3