Link to home
Start Free TrialLog in
Avatar of dave_p
dave_p

asked on

mmx matrix methods

I work in fluid dynamics. I have a Windows NT/W95 product that is heavy into number crunching, matrix methods to be exact. Someone mentioned to me that I should investigate tools or functionality available to me via mmx technology that might give me some gains in run times. I have no idea what mmx technology is or what it might give me or even where to look. Is this an API? Can anybody tell me if and where I should be looking or whether this is a dead end.

Thanks!

Dave P
ASKER CERTIFIED SOLUTION
Avatar of tvarhe
tvarhe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dave_p
dave_p

ASKER

Thanks for the info. Is mmx technology applicable to general numerical methods or just to multimedia applications?

Dave P
Here's a more correct explanation:

MMX is Intel's implementation of an architecture that allows the processor to compute an operation on multiple integer arguments in parallel (outside the Intel world it is known as "Single Instruction Multiple Data" -- SIMD).

MMX works by aliasing the floating-point registers to MMX registers (therefore you cannot intermix FP and MMX (integer) operations, you have to "switch modes").

Each MMX register is 64-bits but can also be used as 2 32-bit, 4 16-bit or 8 8-bit registers that operate in parallel.
For example you could simultaneously perform eight X1 = X2 * X3 + X4 operations when each Xn is an 8-bit integer.

Intel's competitors (AMD, Cytix) implemented a similar architecture, some with enhancements (such as a separate block of registers for MMX, etc.)

MMX can be translated as MultiMedia eXtentions (they usually involve lots of small int operations), Matrix Math eXtentions (which they really are) or, my favorite, Much More eXpensive (which, after the price cuts, is no longer true).

Now to answer your questions specifically:

Either you have a processor that implements MMX or you don't.  You cannot "add" MMX functionality to a processor.  If your app uses MMX commands it may run faster on an MMX processor but not at all on a non-MMX one.

MMX can speed up algebraic operation on integers but have no benefit for floating point operations.

As MMX is a "low-level" architecture, usually you do not utilize it directly (unless you're into assembly programming).  Instead you get a compiler that can do MMX optimizations and invoke it with the appropriate switches.

A Pentium with MMX is actually faster than one without MMX even for software that does not use MMX operations because its internal cache is twice the size.

Finally, you're better off finding a better optimized numeric library.

If you think this is a good answer, you know what to do...
Avatar of dave_p

ASKER

Thanks!
Oh well, you win some and you lose some...