[Numpy-svn] [numpy/numpy] dcfe32: ENH: avoid expensive clears in fenv functions

GitHub noreply at github.com
Wed Nov 6 17:32:08 EST 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: dcfe3260e2d6d9de7a2c3fb0022ecf124faa2ae2
      https://github.com/numpy/numpy/commit/dcfe3260e2d6d9de7a2c3fb0022ecf124faa2ae2
  Author: Julian Taylor <jtaylor.debian at googlemail.com>
  Date:   2013-11-06 (Wed, 06 Nov 2013)

  Changed paths:
    M doc/source/reference/c-api.coremath.rst
    M doc/source/reference/c-api.ufunc.rst
    M numpy/core/include/numpy/npy_math.h
    M numpy/core/include/numpy/ufuncobject.h
    M numpy/core/src/npymath/ieee754.c.src
    M numpy/core/src/umath/simd.inc.src
    M numpy/core/src/umath/ufunc_object.c
    M numpy/linalg/umath_linalg.c.src

  Log Message:
  -----------
  ENH: avoid expensive clears in fenv functions

Clearing is 50-100 times more expensive than checking on x86, so check if there
is anything needs to be cleared first. This speeds up scalar operations
by 10%-20%.
Based on Arink Verma code in #3739.

Implement the functions as new C-API functions npy_get_floatstatus and
npy_clear_floatstatus in npy_math.


  Commit: d071d3f9d80886868c5ce790289f2af03bed43b1
      https://github.com/numpy/numpy/commit/d071d3f9d80886868c5ce790289f2af03bed43b1
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-11-06 (Wed, 06 Nov 2013)

  Changed paths:
    M doc/source/reference/c-api.coremath.rst
    M doc/source/reference/c-api.ufunc.rst
    M numpy/core/include/numpy/npy_math.h
    M numpy/core/include/numpy/ufuncobject.h
    M numpy/core/src/npymath/ieee754.c.src
    M numpy/core/src/umath/simd.inc.src
    M numpy/core/src/umath/ufunc_object.c
    M numpy/linalg/umath_linalg.c.src

  Log Message:
  -----------
  Merge pull request #3974 from juliantaylor/fenv-improve

ENH: avoid expensive clears in fenv functions


Compare: https://github.com/numpy/numpy/compare/e7e365fa6c3f...d071d3f9d808


More information about the Numpy-svn mailing list