[Numpy-discussion] numexpr with the new iterator
Mark Wiebe
mwwiebe at gmail.com
Mon Jan 10 11:54:16 EST 2011
On Mon, Jan 10, 2011 at 2:05 AM, Francesc Alted <faltet at pytables.org> wrote:
> <snip>
>
> Your patch looks mostly fine to my eyes; good job! Unfortunately, I've
> been unable to compile your new_iterator branch of NumPy:
>
> numpy/core/src/multiarray/multiarraymodule.c:45:33: fatal error:
> new_iterator_pywrap.h: El fitxer o directori no existeix
>
> Apparently, you forgot to add the new_iterator_pywrap.h file.
>
Oops, that's added now.
> My idea would be to merge your patch in numexpr and make the new
> `evaluate_iter()` the default (i.e. make it `evaluate()`). However, by
> looking into the code, it seems to me that unaligned arrays (this is an
> important use case when operating with columns of structured arrays) may
> need more fine-tuning for Intel platforms. When I can compile the
> new_iterator branch, I'll give a try at unaligned data benchs.
>
The aligned case should just be a matter of conditionally removing the
NPY_ITER_ALIGNED flag in two places.
The new code also needs support for the reduce operation. I didn't look too
closely at the code for that, but a nested iteration pattern is probably
appropriate. If the inner loop is just allowed to be one dimension, it
could be done without actually creating the inner iterator.
-Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110110/2409d499/attachment.html>
More information about the NumPy-Discussion
mailing list