Code optimization

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2361 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2011-09-14 12:22:04 +00:00
commit ef15b782f7

View file

@ -66,7 +66,7 @@ public:
/**
* Incremental evaluation of the PPP solution,function inline can be called from host or device
* @param _solthe solution to evaluate
* @param _sol the solution to evaluate
* @param _fitness the fitness of the current solution
* @param _index an array that contains a set of indexes corresponding to the current thread identifier neighbor the last element of this array contains neighborhood size
*/
@ -75,7 +75,6 @@ public:
int H[Nd];
int S[Md];
int tmp=0;
int tmp_1=0;
int tmp_2=0;
@ -90,10 +89,10 @@ public:
H[j]=0;
for (unsigned i=0; i<Md; i++) {
for(unsigned k=0;k<NB_POS;k++)
tmp=S[i]-2*dev_a[i*Nd+_index[k]]*_sol[_index[k]];
tmp_1=tmp_1+abs(tmp)-tmp;
if(tmp>0)
H[tmp-1]=H[tmp-1]+1;
S[i]=S[i]-2*dev_a[i*Nd+_index[k]]*_sol[_index[k]];
tmp_1=tmp_1+abs(S[i])-S[i];
if(S[i]>0)
H[S[i]-1]=H[S[i]-1]+1;
}
for (unsigned j=0; j<Nd; j++)