[Cython] OpenCL support
Sturla Molden
sturla at molden.no
Tue Feb 7 18:58:41 CET 2012
On 07.02.2012 18:22, Dimitri Tcaciuc wrote:
> I'm not sure I understand you, maybe you could elaborate on that?
OpenCL code is a text string that is compiled when the program runs. So
it can be generated from run-time data. Think of it like dynamic HTML.
> Again, not sure what you mean here. As I mentioned in the thread,
> PyOpenCL worked quite fine, however if Cython is getting OpenCL
> support, I'd much rather use that than keeping a dependency on another
> library.
You can use PyOpenCL or OpenCL C or C++ headers with Cython. The latter
you just use as you would with any other C or C++ library. You don't
need to change the compiler to use a library: It seems like you think
OpenCL is compiled from code when you build the program. It is actually
compiled from text strings when you run the program. It is meaningless
to ask if Cython supports OpenCL because Cython supports any C library.
Sturla
More information about the cython-devel
mailing list