How to create Matrix Multiplication Using Multithreading..plzz

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ABOD
    New Member
    • Jun 2008
    • 2

    How to create Matrix Multiplication Using Multithreading..plzz

    hi all...plzz..hel p me to solve this Q.

    write a multithreading program to multiply ttwo matrices M and N.
    The two matrices may have differnrt size.
    M is (r*w) and N is(w*z)
    The result is a r*z Matrix.
    You need to compute the result matrix elements concurrently.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by ABOD
    hi all...plzz..hel p me to solve this Q.

    write a multithreading program to multiply ttwo matrices M and N.
    The two matrices may have differnrt size.
    M is (r*w) and N is(w*z)
    The result is a r*z Matrix.
    You need to compute the result matrix elements concurrently.
    Can you calculate the dot product of a row of a matrix and a column of (another)
    matrix? Simply start a thread for every row of the left hand side matrix that
    multiplies that row with all the columns of the right hand side matrix. The result
    will be another row vector. Collect all those vectors and voila. All you have to do
    now is implement it, it's easy because none of the threads try to write to a same
    memory location so there is no locking nor synchronization required.

    kind regards,

    Jos

    Comment

    • ABOD
      New Member
      • Jun 2008
      • 2

      #3
      Thanks alot ..but plz solve it ..

      thx again

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by ABOD
        Thanks alot ..but plz solve it ..

        thx again
        In your original post you wrote "help me to solve this Q"; to me that implies that
        you want to or have to solve this little problem yourself. I helped you so now you
        implement it and solve it. I did the thinking for you already.

        kind regards,

        Jos

        Comment

        Working...