f



Speed-up computation of equation containing several matrix sub-computations using parallel processing?

Hello,

I'm trying to solve an equation of the form:

Y = Y0 - ( Un.* (A*Y0) + Vn.*(Y0*Z) )*delta_t

as efficiently as possible where Y0, Un, Vn, A, and Z are all square matrices of size on the order of 300 X 300 and delta_t is a constant.

Would computing A2 = A*Y0 and Z2 = Y0*Z followed by Un2 = Un.*A2 and Vn2 = Vn.*Z2 in parallel speed-up the overall computation of Y? 

If so, what is the best way to do this (having access to the Parallel Computing Toolbox and a dual-core processor)? 

Is there another/better way? Or does MATLAB automatically/internally optimize efficiency of such a computation?

Many thanks in advance... 
0
Evan
3/24/2011 10:51:04 AM
comp.soft-sys.matlab 211266 articles. 15 followers. lunamoonmoon (258) is leader. Post Follow

2 Replies
1603 Views

Similar Articles

[PageSpeed] 49

"Evan Ruzanski" wrote in message <imf7mo$ftb$1@fred.mathworks.com>...
> Hello,
> 
> I'm trying to solve an equation of the form:
> 
> Y = Y0 - ( Un.* (A*Y0) + Vn.*(Y0*Z) )*delta_t
> 
> as efficiently as possible where Y0, Un, Vn, A, and Z are all square matrices of size on the order of 300 X 300 and delta_t is a constant.

Are you trying to "solve"? If yes what are known what are the unknowns?

Or do you want simply to compute Y?

Bruno
0
Bruno
3/24/2011 11:58:05 AM
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <imfbkd$jlj$1@fred.mathworks.com>...
> "Evan Ruzanski" wrote in message <imf7mo$ftb$1@fred.mathworks.com>...
> > Hello,
> > 
> > I'm trying to solve an equation of the form:
> > 
> > Y = Y0 - ( Un.* (A*Y0) + Vn.*(Y0*Z) )*delta_t
> > 
> > as efficiently as possible where Y0, Un, Vn, A, and Z are all square matrices of size on the order of 300 X 300 and delta_t is a constant.
> 
> Are you trying to "solve"? If yes what are known what are the unknowns?
> 
> Or do you want simply to compute Y?
> 
> Bruno

Sorry for the error in semantics...I'm trying to compute Y in the most efficient manner possible. Is breaking the problem into:

Step 1. Solve A2 = A*Y0 and Z2 = Y0*Z in parallel
Step 2. Solve Un2 = Un.*A2 and Vn2 = Vn.*Z2 in parallel
Step 3. Solve Y = Y0 - (Un2 + Vn2)*dt

faster/more efficient than

Step 1. Solve Y = Y0 - ( Un.*(A*Y0) + Vn.*(Y0*Z) )*dt 
0
Evan
3/24/2011 6:07:05 PM
Reply: