git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2001 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
boufaras 2010-11-23 13:37:59 +00:00
commit bbc84bfd69

View file

@ -63,7 +63,8 @@ public:
host_FitnessArray = new Fitness[neighborhoodSize]; host_FitnessArray = new Fitness[neighborhoodSize];
cudaMalloc((void**) &device_FitnessArray, neighborhoodSize cudaMalloc((void**) &device_FitnessArray, neighborhoodSize
* sizeof(Fitness)); * sizeof(Fitness));
kernel_Dim=neighborhoodSize/BLOCK_SIZE+((neighborhoodSize%BLOCK_SIZE==0)?0:1); kernel_Dim = neighborhoodSize / BLOCK_SIZE + ((neighborhoodSize
% BLOCK_SIZE == 0) ? 0 : 1);
} }
/** /**
@ -87,15 +88,16 @@ public:
_neighbor.fitness(host_FitnessArray[_neighbor.index()]); _neighbor.fitness(host_FitnessArray[_neighbor.index()]);
/*std::cout << _sol.fitness() << " -host_FitnessArray[" /*std::cout << _sol.fitness() << " -host_FitnessArray["
<< _neighbor.index() << "]= " << _neighbor.index() << "]= "
<< host_FitnessArray[_neighbor.index()] << std::endl;*/ << host_FitnessArray[_neighbor.index()] << std::endl;*/
} }
/** /**
* Compute fitness for all solution neighbors in device * Compute fitness for all solution neighbors in device
* @param * @param _sol the solution which generate the neighborhood
* _sol the solution which generate the neighborhood * @param _mapping the neighborhood mapping
* @param _Kswap the number of swap
*/ */
virtual void neighborhoodEval(EOT & _sol, unsigned * _mapping, virtual void neighborhoodEval(EOT & _sol, unsigned * _mapping,
unsigned _Kswap) { unsigned _Kswap) {