09 September 2013 1 5K Report

I have been looking for making my code faster for a while, since it needs houres for running only one configuration, I need tens of runs. It contains millions of call for some functions.

As a solution, I found that using the parfor stucture might bring some improvement since I have a multi-core processor. The problmem however is that it does always give the same error:

"The variable pop in a parfor cannot be classified"

So, I would be very grateful if I get any insights.

Here is the portion of code containing the issue:

**********

parfor i=1:np

xi=pop(i,:);

j=randi(np);

while j==i

j=randi(np);

end

k=randi(np);

while k==i || k==j

k=randi(np);

end

l=randi(np);

while l==i || l==j || l==k

l=randi(np);

end

xj=pop(j,:);

xk=pop(k,:);

xl=pop(l,:);

vi=mutate(xj,xk,xl,f);

ui=binCross(xi,vi,cr);

ui=simplebounds(ui,Lb,Ub);

fu=cec13_func(ui',func);

if fu

More Amer Draa's questions See All
Similar questions and discussions