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

This commit is contained in:
boufaras 2011-03-17 13:46:57 +00:00
commit 43e1f0614f

View file

@ -39,10 +39,11 @@
/** /**
* Abstract class for evaluation on GPU * Abstract class for evaluation on GPU
*/ */
template<class Neighbor> template<class Neighbor>
class moCudaEval: public moEval<Neighbor> { class moCudaEval: public moEval<Neighbor> {
public: public:
/** /**
* Define type of a solution corresponding to Neighbor * Define type of a solution corresponding to Neighbor
@ -75,6 +76,7 @@ class moCudaEval: public moEval<Neighbor> {
delete[] host_FitnessArray; delete[] host_FitnessArray;
cudaFree(device_FitnessArray); cudaFree(device_FitnessArray);
cudaFree(&device_solution); cudaFree(&device_solution);
} }
/** /**
@ -95,6 +97,7 @@ class moCudaEval: public moEval<Neighbor> {
* @param _mapping the neighborhood mapping * @param _mapping the neighborhood mapping
* @param _Kswap the number of swap * @param _Kswap the number of swap
*/ */
virtual void neighborhoodKswapEval(EOT & _sol, unsigned * _mapping, virtual void neighborhoodKswapEval(EOT & _sol, unsigned * _mapping,
unsigned _Kswap) { unsigned _Kswap) {
@ -118,7 +121,7 @@ class moCudaEval: public moEval<Neighbor> {
virtual void neighborhoodEval(EOT & _sol)=0; virtual void neighborhoodEval(EOT & _sol)=0;
protected: protected:
//the host array to save all neighbors fitness //the host array to save all neighbors fitness
Fitness * host_FitnessArray; Fitness * host_FitnessArray;