Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: multithreading

Subject: multithreading

From: wapo

Date: 09 May, 2008 13:53:33

Message: 1 of 4

Hi all,

Lets assume that I have a matrix like:

mtrx=rand(2,100);

If I have a system with multiple processors and I have the
multithreading option on how do I perform a row-wise operation on the
matrix but I specifically assign each thread to take care of one row.
For example I want to find the sum for each row, so:

Thread 1: sum(mtrx(1,:))
Thread 1: sum(mtrx(2,:))

Thanks in advance

Apo

Ps. I used sum as an example. I am interested in more complicated
operations.

Subject: Re: multithreading

From: Steve Amphlett

Date: 09 May, 2008 14:13:05

Message: 2 of 4

wapo <apostolos.georgakis@gmail.com> wrote in message
<ec0cbb1d-abce-49e7-a13e-
523dd7fad1a8@k13g2000hse.googlegroups.com>...
> Hi all,
>
> Lets assume that I have a matrix like:
>
> mtrx=rand(2,100);
>
> If I have a system with multiple processors and I have the
> multithreading option on how do I perform a row-wise
operation on the
> matrix but I specifically assign each thread to take care
of one row.
> For example I want to find the sum for each row, so:
>
> Thread 1: sum(mtrx(1,:))
> Thread 1: sum(mtrx(2,:))
>
> Thanks in advance
>
> Apo
>
> Ps. I used sum as an example. I am interested in more
complicated
> operations.

http://www.mathworks.com

Type multithreaded into the search box. This is the first
hit:


http://www.mathworks.com/products/matlab/demos.html?
file=/products/demos/shipping/matlab/multithreadedcomputatio
ns.html

Subject: Re: multithreading

From: wapo

Date: 12 May, 2008 06:35:59

Message: 3 of 4

I wish it was that simple. It looks like that the demo requires the
distributed computing toolbox or something similar. I am looking for a
way to manually assign tasks to threads.

Subject: Re: multithreading

From: Ben

Date: 12 May, 2008 21:16:15

Message: 4 of 4

On May 12, 2:35 am, wapo <apostolos.georga...@gmail.com> wrote:
> I wish it was that simple. It looks like that the demo requires the
> distributed computing toolbox or something similar. I am looking for a
> way to manually assign tasks to threads.

Just an FYI: there are high level packages for doing multiprocessor
computing with matlab, called Star-P:
http://www.interactivesupercomputing.com/productinfo/pdf/dataSheet_star-p_matlab_lowres.pdf

It would really be nice if Matlab did what you're asking, similar to
openMP directives in other languages.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics