[Numpy-discussion] Objected-oriented SIMD API for Numpy
Wed Oct 21 07:27:46 CDT 2009
On Wed, Oct 21, 2009 at 6:12 PM, Francesc Alted <firstname.lastname@example.org> wrote:
> A Wednesday 21 October 2009 07:44:39 Mathieu Blondel escrigué:
>> About one year ago, a high-level, objected-oriented SIMD API was added
>> to Mono. For example, there is a class Vector4f for vectors of 4
>> floats and this class implements methods such as basic operators,
>> bitwise operators, comparison operators, min, max, sqrt, shuffle
>> directly using SIMD operations.
> It is important to stress out that all the above operations, except probably
> sqrt, are all memory-bound operations, and that implementing them for numpy
> would not represent a significant improvement at all.
> This is because numpy is a package that works mainly with arrays in an
> element-wise way, and in this scenario, the time to transmit data to CPU
> dominates, by and large, over the time to perform operations.
Is it general, or just for simple operations in numpy and ufunc ? I
remember that for music softwares, SIMD used to matter a lot, even for
simple bus mixing (which is basically a ax+by with a, b scalars and x
y the input arrays).
Do you have any interest in adding SIMD to some core numpy
(transcendental functions). If so, I would try to go back to the
problem of runtime SSE detection and loading of optimized shared
library in a cross-platform way - that's something which should be
done at some point in numpy, and people requiring it would be a good
More information about the NumPy-Discussion