[Numpy-svn] [numpy/numpy] 433f89: MAINT: move npy_is_aligned to common.h

GitHub noreply at github.com
Sun Aug 11 17:06:14 EDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 433f8968e4df729093ca627546a647a31fc2ed8c
      https://github.com/numpy/numpy/commit/433f8968e4df729093ca627546a647a31fc2ed8c
  Author: Julian Taylor <jtaylor.debian at googlemail.com>
  Date:   2013-08-09 (Fri, 09 Aug 2013)

  Changed paths:
    M numpy/core/src/multiarray/common.c
    M numpy/core/src/multiarray/common.h
    M numpy/core/src/private/lowlevel_strided_loops.h

  Log Message:
  -----------
  MAINT: move npy_is_aligned to common.h

also make it and some other alignment operators a bit faster by using
unsigned integers and bitwise and if possible.
Make use of npy_is_aligned in _IsAligned too.


  Commit: e91acdb17b2a9c65a0fb9b7a97764aa375819784
      https://github.com/numpy/numpy/commit/e91acdb17b2a9c65a0fb9b7a97764aa375819784
  Author: Julian Taylor <jtaylor.debian at googlemail.com>
  Date:   2013-08-09 (Fri, 09 Aug 2013)

  Changed paths:
    M numpy/core/include/numpy/npy_common.h
    M numpy/core/setup_common.py
    M numpy/core/src/multiarray/common.h

  Log Message:
  -----------
  ENH: add NPY_LIKELY and NPY_UNLIKELY macros for branching hints

Use it for npy_is_aligned expecting alignments of the power of two.
Cuts down the time spent in _IsAligned by the testsuite relative
to the rest of multiarray.so from 0.6% to 0.4%


  Commit: a23803e9e5f286d5bbdb3d5059d7630e6bd775a2
      https://github.com/numpy/numpy/commit/a23803e9e5f286d5bbdb3d5059d7630e6bd775a2
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-08-11 (Sun, 11 Aug 2013)

  Changed paths:
    M numpy/core/include/numpy/npy_common.h
    M numpy/core/setup_common.py
    M numpy/core/src/multiarray/common.c
    M numpy/core/src/multiarray/common.h
    M numpy/core/src/private/lowlevel_strided_loops.h

  Log Message:
  -----------
  Merge pull request #3594 from juliantaylor/is_aligned_maint

MAINT: move npy_is_aligned to common.h


Compare: https://github.com/numpy/numpy/compare/3e34afc0bebb...a23803e9e5f2


More information about the Numpy-svn mailing list