[Numpy-svn] [numpy/numpy] be294a: ENH: expose PyDataMem_NEW/FREE/RENEW as numpy API ...

GitHub noreply@github....
Wed Jul 11 08:53:48 CDT 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: be294ab42bc51c7588e9ed50982046c03f00f618
      https://github.com/numpy/numpy/commit/be294ab42bc51c7588e9ed50982046c03f00f618
  Author: Thouis (Ray) Jones <thouis@gmail.com>
  Date:   2012-06-15 (Fri, 15 Jun 2012)

  Changed paths:
    M numpy/core/code_generators/numpy_api.py
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/multiarray_tests.c.src
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/src/npysort/sort.c.src
    M numpy/core/tests/test_multiarray.py
    M numpy/lib/src/_compiled_base.c

  Log Message:
  -----------
  ENH: expose PyDataMem_NEW/FREE/RENEW as numpy API functions with an event hook.

Moves PyDataMem_NEW/FREE/RENEW to the external API.
Fixes PyDataMem_NEW/RENEW to return void* instead of char*.
Replaces PyDataMem_NEW/FREE with NpySortArray_malloc/free in sort.c.src
  (should be reverted if npysort is moved to be part of multiarraymodule).
Adds PyDataMem_SetEventHook which takes a (PyDataMem_EventHookFunc *) as an argument,
  with signature:
       void hook(void *old, void *new, size_t size).
  When not NULL, hook will be called at the end of each PyDataMem_NEW/FREE/RENEW:
   result = PyDataMem_NEW(size)        -> (*hook(NULL, result, size)
   PyDataMem_FREE(ptr)                 -> (*hook(ptr, NULL, 0)
   result = PyDataMem_RENEW(ptr, size) -> (*hook)(ptr, result, size)
Adds tests in multiarray_tests.c.src, driven by tests/test_multiarray.py.


  Commit: 32370937a5692befe4971790cc0b71f72fe08bb1
      https://github.com/numpy/numpy/commit/32370937a5692befe4971790cc0b71f72fe08bb1
  Author: Thouis (Ray) Jones <thouis@gmail.com>
  Date:   2012-06-15 (Fri, 15 Jun 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/multiarray_tests.c.src
    M numpy/core/src/multiarray/multiarraymodule.c

  Log Message:
  -----------
  Add void *user_data to EventHookFunc and SetEventHook


  Commit: 5b5a0f4999dfac66c9c27160737352c727a3517b
      https://github.com/numpy/numpy/commit/5b5a0f4999dfac66c9c27160737352c727a3517b
  Author: Thouis (Ray) Jones <thouis@gmail.com>
  Date:   2012-06-18 (Mon, 18 Jun 2012)

  Changed paths:
    M numpy/core/src/multiarray/multiarraymodule.c
    A tools/allocation_tracking/alloc_hook.pyx
    A tools/allocation_tracking/setup.py
    A tools/allocation_tracking/sorttable.js
    A tools/allocation_tracking/track_allocations.py

  Log Message:
  -----------
  Wrap hook functions with GIL, add example.

Wraps the SetHook and calls to the hook with the GIL, to prevent races.
Adds an example of using the interface for callbacks into python code.


  Commit: aeff403ff868e822ebebdb8e6fb02055cd6ccf5b
      https://github.com/numpy/numpy/commit/aeff403ff868e822ebebdb8e6fb02055cd6ccf5b
  Author: Thouis (Ray) Jones <thouis@gmail.com>
  Date:   2012-07-06 (Fri, 06 Jul 2012)

  Changed paths:
    A .travis-make-py24-virtualenv.sh
    A .travis.yml
    M doc/HOWTO_RELEASE.rst.txt
    M doc/release/2.0.0-notes.rst
    R doc/source/reference/arrays.maskna.rst
    M doc/source/reference/arrays.rst
    M doc/source/reference/c-api.array.rst
    R doc/source/reference/c-api.maskna.rst
    M doc/source/reference/c-api.rst
    M doc/source/reference/routines.polynomials.classes.rst
    M doc/source/reference/routines.rst
    M numpy/add_newdocs.py
    M numpy/core/SConscript
    M numpy/core/_methods.py
    M numpy/core/arrayprint.py
    M numpy/core/bscript
    M numpy/core/code_generators/cversions.txt
    M numpy/core/code_generators/genapi.py
    M numpy/core/code_generators/numpy_api.py
    M numpy/core/fromnumeric.py
    M numpy/core/function_base.py
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/include/numpy/ufuncobject.h
    M numpy/core/memmap.py
    M numpy/core/numeric.py
    M numpy/core/numerictypes.py
    M numpy/core/setup.py
    M numpy/core/src/multiarray/_datetime.h
    M numpy/core/src/multiarray/array_assign.h
    M numpy/core/src/multiarray/array_assign_array.c
    M numpy/core/src/multiarray/array_assign_scalar.c
    M numpy/core/src/multiarray/arrayobject.c
    M numpy/core/src/multiarray/arraytypes.c.src
    R numpy/core/src/multiarray/boolean_ops.c.src
    R numpy/core/src/multiarray/boolean_ops.h
    M numpy/core/src/multiarray/buffer.c
    M numpy/core/src/multiarray/calculation.c
    M numpy/core/src/multiarray/common.c
    M numpy/core/src/multiarray/common.h
    M numpy/core/src/multiarray/conversion_utils.c
    M numpy/core/src/multiarray/convert.c
    M numpy/core/src/multiarray/convert_datatype.c
    M numpy/core/src/multiarray/ctors.c
    M numpy/core/src/multiarray/ctors.h
    M numpy/core/src/multiarray/datetime.c
    M numpy/core/src/multiarray/datetime_busdaycal.h
    M numpy/core/src/multiarray/descriptor.c
    M numpy/core/src/multiarray/dtype_transfer.c
    M numpy/core/src/multiarray/einsum.c.src
    M numpy/core/src/multiarray/flagsobject.c
    M numpy/core/src/multiarray/getset.c
    M numpy/core/src/multiarray/item_selection.c
    M numpy/core/src/multiarray/item_selection.h
    M numpy/core/src/multiarray/iterators.c
    M numpy/core/src/multiarray/iterators.h
    M numpy/core/src/multiarray/mapping.c
    M numpy/core/src/multiarray/methods.c
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/src/multiarray/multiarraymodule_onefile.c
    R numpy/core/src/multiarray/na_mask.c
    R numpy/core/src/multiarray/na_mask.h
    R numpy/core/src/multiarray/na_object.c
    R numpy/core/src/multiarray/na_object.h
    M numpy/core/src/multiarray/nditer_api.c
    M numpy/core/src/multiarray/nditer_constr.c
    M numpy/core/src/multiarray/nditer_impl.h
    M numpy/core/src/multiarray/nditer_pywrap.c
    R numpy/core/src/multiarray/reduction.c
    R numpy/core/src/multiarray/reduction.h
    M numpy/core/src/multiarray/scalarapi.c
    M numpy/core/src/multiarray/sequence.c
    M numpy/core/src/multiarray/shape.c
    M numpy/core/src/private/lowlevel_strided_loops.h
    A numpy/core/src/umath/reduction.c
    A numpy/core/src/umath/reduction.h
    M numpy/core/src/umath/ufunc_object.c
    M numpy/core/src/umath/ufunc_type_resolution.c
    M numpy/core/src/umath/umathmodule_onefile.c
    M numpy/core/tests/test_api.py
    A numpy/core/tests/test_indexerrors.py
    R numpy/core/tests/test_maskna.py
    M numpy/core/tests/test_memmap.py
    M numpy/core/tests/test_multiarray.py
    R numpy/core/tests/test_na.py
    M numpy/core/tests/test_nditer.py
    M numpy/core/tests/test_numeric.py
    M numpy/core/tests/test_regression.py
    M numpy/core/tests/test_ufunc.py
    M numpy/lib/function_base.py
    M numpy/lib/npyio.py
    M numpy/lib/tests/test_io.py
    M numpy/lib/twodim_base.py
    M numpy/polynomial/chebyshev.py
    M numpy/polynomial/hermite.py
    M numpy/polynomial/hermite_e.py
    M numpy/polynomial/laguerre.py
    M numpy/polynomial/legendre.py
    M numpy/polynomial/polynomial.py
    M numpy/polynomial/tests/test_chebyshev.py
    M numpy/polynomial/tests/test_hermite.py
    M numpy/polynomial/tests/test_hermite_e.py
    M numpy/polynomial/tests/test_laguerre.py
    M numpy/polynomial/tests/test_legendre.py
    M numpy/polynomial/tests/test_polynomial.py
    M numpy/testing/utils.py
    M setup.py

  Log Message:
  -----------
  Merge remote-tracking branch 'upstream/master' into malloc_hooks


  Commit: b42653982c7e8a093369ec9b1cf6088e47c29904
      https://github.com/numpy/numpy/commit/b42653982c7e8a093369ec9b1cf6088e47c29904
  Author: Thouis (Ray) Jones <thouis@gmail.com>
  Date:   2012-07-06 (Fri, 06 Jul 2012)

  Changed paths:
    M numpy/core/code_generators/cversions.txt

  Log Message:
  -----------
  Update C-API version hash


  Commit: 8ecb4b23bcef5b9e004d8c175e7d6ae473751907
      https://github.com/numpy/numpy/commit/8ecb4b23bcef5b9e004d8c175e7d6ae473751907
  Author: njsmith <njs@pobox.com>
  Date:   2012-07-11 (Wed, 11 Jul 2012)

  Changed paths:
    M numpy/core/code_generators/cversions.txt
    M numpy/core/code_generators/numpy_api.py
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/multiarray_tests.c.src
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/src/npysort/sort.c.src
    M numpy/core/tests/test_multiarray.py
    M numpy/lib/src/_compiled_base.c
    A tools/allocation_tracking/alloc_hook.pyx
    A tools/allocation_tracking/setup.py
    A tools/allocation_tracking/sorttable.js
    A tools/allocation_tracking/track_allocations.py

  Log Message:
  -----------
  Merge pull request #309 from thouis/malloc_hooks

ENH: expose PyDataMem_NEW/FREE/RENEW as numpy API functions with an event hook.


Compare: https://github.com/numpy/numpy/compare/64c3a8f464e1...8ecb4b23bcef


More information about the Numpy-svn mailing list