Results 1 to 4 of 4

Thread: Threading

  1. #1
    hedonist is offline Member
    Join Date
    Jun 2009
    Posts
    35
    Rep Power
    0

    Default Threading

    Hi,
    I am very curious to implement threading for very large 2-D matrix multiplication, matrix size greater than 1000. I am new to this concept so I have googled and read few articles but it would be nicer if a guru from here would help and point me in the write direction.(some links maybe or ideas, even better)
    I appreciate the help.
    Thank you.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by hedonist View Post
    Hi,
    I am very curious to implement threading for very large 2-D matrix multiplication, matrix size greater than 1000. I am new to this concept so I have googled and read few articles but it would be nicer if a guru from here would help and point me in the write direction.(some links maybe or ideas, even better)
    I appreciate the help.
    Thank you.
    Matrix multiplication can be easily parallelized: matrix multiplication is taking dot products of a row vector of the left matrix and a column vector or the rigth matrix. All rows and all columns have to be (dot) multiplied.

    If you have n cores in your processor divide this multiplication in n subtasks where the rows are all disjoint and multply away; the tasks all use disjoint rows and only read the columns from the right matrix. The results (scalars) are stored at disjoint locations so no thread synchronization is necessary.

    The scenario gives you a speedup of at most a factor n.

    kind regards,

    Jos

  3. #3
    hedonist is offline Member
    Join Date
    Jun 2009
    Posts
    35
    Rep Power
    0

    Default

    Thank you JosAH
    Its very informative. Can you practically illustrate it further using an example of matrix?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by hedonist View Post
    Thank you JosAH
    Its very informative. Can you practically illustrate it further using an example of matrix?
    No because I would be doing your job.

    kind regards,

    Jos

Similar Threads

  1. need some help with threading
    By dinosoep in forum New To Java
    Replies: 3
    Last Post: 12-03-2009, 05:31 PM
  2. Threading
    By jon80 in forum New To Java
    Replies: 1
    Last Post: 06-13-2009, 10:53 PM
  3. Threading in EJB
    By java08 in forum Advanced Java
    Replies: 2
    Last Post: 08-12-2008, 11:09 AM
  4. Java threading
    By Eranga in forum Advanced Java
    Replies: 2
    Last Post: 03-13-2008, 05:30 AM
  5. Threading prob..
    By banie in forum Java Applets
    Replies: 0
    Last Post: 02-05-2008, 06:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •