[Python-compilers] Wrapping JIT-compiled functions

Stefan Behnel stefan_ml at behnel.de
Sun Jul 10 12:09:40 EDT 2016

Mark Dewing schrieb am 10.07.2016 um 07:23:
> It seems any wrapper around
> a native code library that uses
> callbacks will need code to handle a native code callback vs. a Python
> callback.
>  For details, see these pull requests:
>      https://github.com/saullocastro/cubature/pull/16
>      https://github.com/JohannesBuchner/PyMultiNest/pull/73/files
> One of the issues in generalizing this is how to scale to different
> libraries and callbacks without needing to program knowledge of each of
> them into Sympy.
> There needs to be some way to describe the parameters expected in the
> callback, but it should be at a higher level than just C types - which ones
> are inputs, outputs, array lengths, etc.

A couple of years ago, we did some thinking about this in the Cython
project. Here's the write-up from back then, don't remember how complete it
is. It never lead anywhere since no-one stepped up to implement that protocol.



More information about the Python-compilers mailing list