Hi,
I have a code which calculates the matrix elements of A from a vector v. It works well in the serial case. When I try to speed up the calculation using parfor, I get an error "The variable A in a parfor cannot be classified".
It seems that the program somehow cannot deal with the temporary variables as the indicies for the matrix A… Any suggestions or workaround for this?
A = zeros(n,n);for kk = 1:D sk = <expressions>; ek = <expressions>; parfor ll = 1:D sl = <expressions>; el = <expressions>; if (ek == el) A(sk,sl) = A(sk,sl)+conj(v(kk))*v(ll); end endend
Best Answer