[Numpy-discussion] Objected-oriented SIMD API for Numpy

Robert Kern robert.kern@gmail....
Thu Oct 22 11:01:20 CDT 2009

On Thu, Oct 22, 2009 at 06:20, Dag Sverre Seljebotn
<dagss@student.matnat.uio.no> wrote:
> Robert Kern wrote:
>> On Wed, Oct 21, 2009 at 22:32, Mathieu Blondel <mathieu@mblondel.org> wrote:
>>> On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden <sturla@molden.no> wrote:
>>>> Mathieu Blondel skrev:
>>>>> Hello,
>>>>> 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".
>> No, I think you're right. Using "SIMD" to refer to numpy-like
>> operations is an abuse of the term not supported by any outside
>> community that I am aware of. Everyone else uses "SIMD" to describe
>> hardware instructions, not the application of a single syntactical
>> element of a high level language to a non-trivial data structure
>> containing lots of atomic data elements.
> BTW, is there any term for this latter concept that's not SIMD or
> "vector operation"? It would be good to have a word to distinguish this
> concept from both CPU instructions and linear algebra.

Of course, "vector instruction" and "vectorized operation" sometimes
also refer to the CPU instructions. :-)

I don't think you will get much better than "vectorized operation",
though. While it's ambiguous, it has a long history in the high level
language world thanks to Matlab.

> (Personally I think describing NumPy as SIMD and use "SSE/MMX" for CPU
> instructions makes best sense, but I'm happy to yield to conventions...)

Well, "SSE/MMX" is also too limiting. Altivec instructions are also in
the same class, and we should be able to use them on PPC platforms.
Regardless of the origin of the term, "SIMD" is used to refer to all
of these instructions in common practice. Sturla may be right in some
prescriptive sense, but descriptively, he's quite wrong.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list