Re: [Numpy-discussion] Memory allocation cleanup

2014-01-10 Thread Julian Taylor
On 10.01.2014 17:03, Nathaniel Smith wrote: > On Fri, Jan 10, 2014 at 9:18 AM, Julian Taylor > wrote: >> On Fri, Jan 10, 2014 at 3:48 AM, Nathaniel Smith wrote: >>> [...] >> >> For this reason and missing calloc I don't think we should use the Python >> API for data buffers just yet. Any benefits

Re: [Numpy-discussion] Memory allocation cleanup

2014-01-10 Thread Nathaniel Smith
On Fri, Jan 10, 2014 at 9:18 AM, Julian Taylor wrote: > On Fri, Jan 10, 2014 at 3:48 AM, Nathaniel Smith wrote: >> >> Also, none of the Py* interfaces implement calloc(), which is annoying >> because it messes up our new optimization of using calloc() for >> np.zeros. [...] > > > Another thing th

Re: [Numpy-discussion] Memory allocation cleanup

2014-01-10 Thread Frédéric Bastien
On Fri, Jan 10, 2014 at 4:18 AM, Julian Taylor wrote: > On Fri, Jan 10, 2014 at 3:48 AM, Nathaniel Smith wrote: >> >> On Thu, Jan 9, 2014 at 11:21 PM, Charles R Harris >> wrote: >> > [...] >> >> After a bit more research, some further points to keep in mind: >> >> Currently, PyDimMem_* and PyArr

Re: [Numpy-discussion] Memory allocation cleanup

2014-01-10 Thread Julian Taylor
On Fri, Jan 10, 2014 at 3:48 AM, Nathaniel Smith wrote: > On Thu, Jan 9, 2014 at 11:21 PM, Charles R Harris > wrote: > > [...] > > After a bit more research, some further points to keep in mind: > > Currently, PyDimMem_* and PyArray_* are just aliases for malloc/free, > and PyDataMem_* is an ali

Re: [Numpy-discussion] Memory allocation cleanup

2014-01-09 Thread Nathaniel Smith
On Thu, Jan 9, 2014 at 11:21 PM, Charles R Harris wrote: > Apropos Julian's changes to use the PyObject_* allocation suite for some > parts of numpy, I posted the following > > I think numpy memory management is due a cleanup. Currently we have > > PyDataMem_* > PyDimMem_* > PyArray_* > > Plus the

Re: [Numpy-discussion] Memory allocation cleanup

2014-01-09 Thread Frédéric Bastien
This shouldn't affect Theano. So I have no objection. Making thing faster and more tracktable is always good. So I think it seam a good idea. Fred On Thu, Jan 9, 2014 at 6:21 PM, Charles R Harris wrote: > Apropos Julian's changes to use the PyObject_* allocation suite for some > parts of numpy,

[Numpy-discussion] Memory allocation cleanup

2014-01-09 Thread Charles R Harris
Apropos Julian's changes to use the PyObject_* allocation suite for some parts of numpy, I posted the following I think numpy memory management is due a cleanup. Currently we have PyDataMem_* PyDimMem_* PyArray_* Plus the malloc, PyMem_*, and PyObject_*