Cython / c++ help

Stéfan van der Walt stefan at sun.ac.za
Mon May 27 17:54:50 EDT 2013


On Mon, May 27, 2013 at 10:55 PM, Marc de Klerk <deklerkmc at gmail.com> wrote:

> This operation has to happen a lot… so I really need it to be fast. The
> problem I'm having is that the when I isolate and measure the execution
> time of the gpu code it's much faster than that of the c++ or Cython
> wrapper - which I cannot really do without.
>

Another option is also to call into the NumPy C API to evoke essentially
the equivalent of

np.nonzero(np.diff(np.cumsum(x)))[0] + 1

Stéfan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130527/7d7fb9d7/attachment.html>


More information about the scikit-image mailing list