[Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Henry Gomersall
I've written a few simple cython routines for assisting in creating byte-aligned numpy arrays. The point being for the arrays to work with SSE/AVX code. https://github.com/hgomersall/pyFFTW/blob/master/pyfftw/utils.pxi The change recently has been to add a check on the CPU as to what flags are

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Nathaniel Smith
On Wed, Dec 19, 2012 at 8:40 AM, Henry Gomersall h...@cantab.net wrote: I've written a few simple cython routines for assisting in creating byte-aligned numpy arrays. The point being for the arrays to work with SSE/AVX code. https://github.com/hgomersall/pyFFTW/blob/master/pyfftw/utils.pxi

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Charles R Harris
On Wed, Dec 19, 2012 at 7:43 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Dec 19, 2012 at 8:40 AM, Henry Gomersall h...@cantab.net wrote: I've written a few simple cython routines for assisting in creating byte-aligned numpy arrays. The point being for the arrays to work with SSE/AVX

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Nathaniel Smith
On Wed, Dec 19, 2012 at 2:57 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Dec 19, 2012 at 7:43 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Dec 19, 2012 at 8:40 AM, Henry Gomersall h...@cantab.net wrote: I've written a few simple cython routines for assisting in

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Charles R Harris
On Wed, Dec 19, 2012 at 8:10 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Dec 19, 2012 at 2:57 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Dec 19, 2012 at 7:43 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Dec 19, 2012 at 8:40 AM, Henry Gomersall

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Nathaniel Smith
On Wed, Dec 19, 2012 at 3:27 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Dec 19, 2012 at 8:10 AM, Nathaniel Smith n...@pobox.com wrote: Right, my intuition is that it's like order=C -- if you make a new array by, say, indexing, then it may or may not have order=C, no

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Henry Gomersall
On Wed, 2012-12-19 at 15:57 +, Nathaniel Smith wrote: Not sure which interface is more useful to users. On the one hand, using funny dtypes makes regular non-SIMD access more cumbersome, and it forces your array size to be a multiple of the SIMD word size, which might be inconvenient if

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Francesc Alted
On 12/19/12 5:47 PM, Henry Gomersall wrote: On Wed, 2012-12-19 at 15:57 +, Nathaniel Smith wrote: Not sure which interface is more useful to users. On the one hand, using funny dtypes makes regular non-SIMD access more cumbersome, and it forces your array size to be a multiple of the SIMD

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Henry Gomersall
On Wed, 2012-12-19 at 19:03 +0100, Francesc Alted wrote: snip Finally, I think there is significant value in auto-aligning the array based on an appropriate inspection of the cpu capabilities (or alternatively, a function that reports back the appropriate SIMD alignment). Again, this

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread Nathaniel Smith
On Wed, Dec 19, 2012 at 6:25 PM, Henry Gomersall h...@cantab.net wrote: On Wed, 2012-12-19 at 19:03 +0100, Francesc Alted wrote: snip Finally, I think there is significant value in auto-aligning the array based on an appropriate inspection of the cpu capabilities (or alternatively, a

Re: [Numpy-discussion] Byte aligned arrays

2012-12-19 Thread David Cournapeau
On Wed, Dec 19, 2012 at 6:03 PM, Francesc Alted franc...@continuum.io wrote: On 12/19/12 5:47 PM, Henry Gomersall wrote: On Wed, 2012-12-19 at 15:57 +, Nathaniel Smith wrote: Not sure which interface is more useful to users. On the one hand, using funny dtypes makes regular non-SIMD access