[Numpy-svn] [numpy/numpy] dabe9a: ENH: Make internal per-op nditer flags type a type...

GitHub noreply at github.com
Tue Jun 5 15:45:24 EDT 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: dabe9ab064ae32bfd7cee8c0dc58b175a6955e49
      https://github.com/numpy/numpy/commit/dabe9ab064ae32bfd7cee8c0dc58b175a6955e49
  Author: Mark Wiebe <mwwiebe at gmail.com>
  Date:   2012-05-28 (Mon, 28 May 2012)

  Changed paths:
    M numpy/core/src/multiarray/nditer_api.c
    M numpy/core/src/multiarray/nditer_constr.c
    M numpy/core/src/multiarray/nditer_impl.h

  Log Message:
  -----------
  ENH: Make internal per-op nditer flags type a typedef

There are 8 flags now, so to add another one requires
bumping up the size. This change makes that easy.
Also, because the internal structure of nditer is
not exposed to the ABI, we can change it at will.


  Commit: 4542c43b567af9064f36759afe6064bbb3315728
      https://github.com/numpy/numpy/commit/4542c43b567af9064f36759afe6064bbb3315728
  Author: Mark Wiebe <mwwiebe at gmail.com>
  Date:   2012-05-28 (Mon, 28 May 2012)

  Changed paths:
    M numpy/core/src/multiarray/nditer_api.c
    M numpy/core/src/multiarray/nditer_impl.h

  Log Message:
  -----------
  BUG: Add a new flag to nditer to indicate when op uses buffering

Thouis tracked down an intermittently occurring bug in
ticket #2144, where a reduction under certain situations
would produce wrong results. This occurs when the array
data and the nditer's buffer happen to be adjacent in
memory.

This fixes it by replacing the "clever" trick of checking if
the iterator's pointer is in the buffer with an explicit
flag to signal buffer usage. The reason this can't be reliably
handled via the pointer/buffer check is that the pointer updates
are handled by the consumer of the iterator, who may update
them in place or may use local variables instead. Thus, the
pointer could still point to the beginning of the buffer, or
could point at the byte immediately after the buffer. Using
a flag avoids all of this and should be reliable.


  Commit: de8c536813472be29a6292721df83d73dbf7016e
      https://github.com/numpy/numpy/commit/de8c536813472be29a6292721df83d73dbf7016e
  Author: Nathaniel J. Smith <njs at pobox.com>
  Date:   2012-06-05 (Tue, 05 Jun 2012)

  Changed paths:
    M numpy/core/src/multiarray/nditer_api.c
    M numpy/core/src/multiarray/nditer_constr.c
    M numpy/core/src/multiarray/nditer_impl.h

  Log Message:
  -----------
  Merge remote-tracking branch 'mwiebe/nditer_buffer_flag' into merge-293


Compare: https://github.com/numpy/numpy/compare/fd78546...de8c536


More information about the Numpy-svn mailing list