Thread Subject: Cell Arrays with StarP?

Subject: Cell Arrays with StarP?

From: David Doria

Date: 29 May, 2008 00:42:02

Message: 1 of 2

I am looking to utilize the "parallel for" idea with starP.
An example I got from the website is as follows:

%serial version
a=rand(100,100,500);
tic; for i = 1:500
b(:,:,i) = inv(a(:,:,i));
end; toc

%parallel version:
a=rand(100,100,500*p);
tic; b=ppeval('inv',a); toc

However, I would like to put each element of a cell array
though a parallel for loop:

A{1} = some matrix
A{2} = another matrix
... etc
A{n} = last matrix

Parallel For i = 1:n
  do something to A{n}
end

Is this possible?

Thanks,

Dave

Subject: Cell Arrays with StarP?

From: Sarah

Date: 30 May, 2008 13:51:01

Message: 2 of 2

Hi David.

I know this is possible using the Parallel Computing
Toolbox product with MATLAB. The syntax would be

parfor i = 1:n
  do something to A{n}
end

I do not know about with star-P.

Cheers.
Sarah

"David Doria" <daviddoria@gmail.com> wrote in message
<g1ku4q$emf$1@fred.mathworks.com>...
> I am looking to utilize the "parallel for" idea with
starP.
> An example I got from the website is as follows:
>
> %serial version
> a=rand(100,100,500);
> tic; for i = 1:500
> b(:,:,i) = inv(a(:,:,i));
> end; toc
>
> %parallel version:
> a=rand(100,100,500*p);
> tic; b=ppeval('inv',a); toc
>
> However, I would like to put each element of a cell array
> though a parallel for loop:
>
> A{1} = some matrix
> A{2} = another matrix
> ... etc
> A{n} = last matrix
>
> Parallel For i = 1:n
> do something to A{n}
> end
>
> Is this possible?
>
> Thanks,
>
> Dave

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
parfor parallel... Sarah 30 May, 2008 09:55:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

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 Terms prior to use.

Contact us at files@mathworks.com