[OT] pass a C callback function to a cythom module via python

Stéfan van der Walt stefan at sun.ac.za
Sun Apr 1 12:47:26 EDT 2012


Hi Nadav

On Sun, Apr 1, 2012 at 6:42 AM, Nadav Horesh <nadavh.horesh at gmail.com> wrote:
> A nice idea. As is, it can not replace the link to C code linking because it
> contains to much yellow lines ("cython -a" output) in the main loop, so
> there is a speed penalty, and also I suspect it wouldn't be possible to
> parallelise that function call. Anyway I plan to add this option.

Could you share your benchmark code?  This should be very nearly as
fast as the C pointer call.  And with an appropriate "with nogil"
statement, I think it should parallelize?

Stéfan



More information about the scikit-image mailing list