[PyOpenCL] OpenGL interop on Mac OS X patch
lists at informa.tiker.net
Fri Feb 25 08:07:23 PST 2011
On Fri, 25 Feb 2011 14:43:43 +0000 (UTC), Keith Brafford <keith.brafford at gmail.com> wrote:
> Andreas Kloeckner <lists at ...> writes:
> > Great! Thanks again for your patience.
> Thank you for fixing it and making it work all over the place.
> Out of curiosity, why is it necessary to decide at module compile time whether or
> not you want to be able to do context sharing?
> I can see how a C program wouldn't care that it's a compile time thing, since
> everything is a compile time thing for C. But for PyOpenCL, isn't it possible
> to have some OpenCL solutions (i.e. .py programs that use POCL) that don't use
> sharing, and some OpenCL solutions that do?
> Would it be possible to change the approach to something like this:
> import pyopencl
> pyopencl.USE_SHARING = True
> And have it work correctly?
Nope--the context sharing code is not something that can be built at
runtime, unlike the CL kernels. (Well, technically, it could, but that
would amount to rebuilding PyOpenCL at runtime, which would not make
good sense IMO.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the PyOpenCL