Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Assembly (http://www.programmingforums.org/forum20.html)
-   -   Optimizing Matrix Multiplication (http://www.programmingforums.org/showthread.php?t=1308)

visualize Nov 27th, 2004 12:01 AM

Does anybody have a working algorithm or full copy of code that optimizes matrix multiplication in the x86 assembly language?

I know a basic algorithm in C:
for (i=0;i<BLOCK_SIZE;i++)
for (j=0;j<BLOCK_SIZE;j++)
for (k=0;k<BLOCK_SIZE;k++)
c[i*MAX+j] += a[i*MAX+k]*b[k*MAX+j];

but, does anybody know a faster one?

lostcauz Nov 27th, 2004 1:08 AM

Not sure if it's faster but there is discussion and code concerning a fast 4x4 matrix mult. algorithm here.

kurifu Nov 28th, 2004 3:27 PM

I hate to bring this up, but you could look into the alrogithms used behind DirectX technology if it is available, it has a very highly optimized matrix multiplication alrgorithm.

Ravilj Dec 11th, 2004 2:41 PM

If you need this for graphics programming than the chances of getting your code to run faster than the funcitons supplied by openGL and DX is slim. But I am sure www.google.com will help you out with this.


All times are GMT -5. The time now is 4:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC