MATLAB: How to solve this

parallel computing

a(:,:,1,j+1) = conv2(hj,hj,a(:,:,1,j),'same');
dx(:,:,1,j+1) = conv2(delta,gj,a(:,:,1,j),'same');
dy(:,:,1,j+1) = conv2(gj,delta,a(:,:,1,j),'same');
how do i convert this convolution function in parfor?

Best Answer

Excuse me sir,first of all can i know why and whats the meaning of:
  1. Only the convolutions with respect to gj can be parallelized via parfor?
  2. atmp=a(:,:,1,j); %excessive optimization perhaps, eliminate one subsref() call ?
  3. hj(1:2^j:end)=h; ?
  4. a(:,:,1,J+2)=a(:,:,1,1); %pre-allocation ?
Sorry for asking too much since i'm new learner.