[Numpy-discussion] Objected-oriented SIMD API for Numpy
Wed Oct 21 22:32:13 CDT 2009
On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden <firstname.lastname@example.org> wrote:
> Mathieu Blondel skrev:
>> 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.
> I think you are confusing SIMD with Intel's MMX/SSE instruction set.
OK, I should have said "Object-oriented SIMD API that is implemented
using hardware SIMD instructions".
And when an ISA doesn't allow to perform a specific operation in only
one instruction (say the absolute value of the differences), the
operation can be implemented in terms of other instructions.
> SIMD instructions in hardware for length-4 vectors are mostly useful for
> 3D graphics. But they are not used a lot for that purpose, because GPUs
> are getting common. SSE is mostly for rendering 3D graphics without a
> GPU. There is nothing that prevents NumPy from having a Vector4f dtype,
> that internally stores four float32 and is aligned at 16 byte
> boundaries. But it would not be faster than the current float32 dtype.
> Do you know why?
Yes I know because this has already been explained in this very thread
by someone before you!
More information about the NumPy-Discussion