Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-21-2004, 02:09 AM   #1
LQ Newbie
Registered: Sep 2004
Location: Tripoli
Posts: 22

Rep: Reputation: 15
Question Parallel matrix multiplication

Hi every body..

I need a parallel matrix multiplication code in C language,I need it too much,I have searched the google site but it did not work.any help will be appresiated.
Old 09-21-2004, 03:56 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
Modified C++ code from

I haven't tested this, but it looks like it should work to me.

Calculates l * m, stores result in dest. m_numRows = number of rows in m and number of columns in l. numRows is number of rows in dest, numCols is number of cols in dest. Dimensions are assumed to be correct.

void matrixmul(double ** dest, double ** l, double ** m, int m_numRows, int numRows, int numCols) {
int r,c,i;
for (r=0;r<numRows;r++) {
for (c=0;c<m_numCols;c++) {
for (i=0;i<numCols;i++) {
Old 09-21-2004, 01:25 PM   #3
Registered: Dec 2003
Location: texas
Distribution: fedora core 1, fedora core 2
Posts: 37

Rep: Reputation: 15
he's looking for a parallel matrix multiply algorithm.

i got two questions for you...are you using shared memory or message passing? and is this a homework assignment? =P

-- C
Old 09-22-2004, 06:11 AM   #4
LQ Newbie
Registered: Sep 2004
Location: Tripoli
Posts: 22

Original Poster
Rep: Reputation: 15
you are right ,I am looking for parallel matrix multiply algorithm,
I am using sockets with TCP/IP,stream sockets.
this is not a homework,it's step in project Iam working on...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive, multiplication of mountpoints Jon_Roland Fedora 0 11-07-2005 10:18 PM
floating point multiplication irfanhab Programming 0 12-23-2004 10:13 PM
Matrix Linux ryancoolest Linux - Newbie 2 09-13-2004 08:28 PM
Matrix Linux ryancoolest Linux - Hardware 1 09-13-2004 04:36 AM
The Matrix eresc Linux - Hardware 4 11-28-2003 04:59 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration