git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2113 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
120557fd83
commit
5e576fa051
1 changed files with 46 additions and 0 deletions
|
|
@ -32,3 +32,49 @@
|
|||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __moCudaEvalFunc_H
|
||||
#define __moCudaEvalFunc_H
|
||||
|
||||
/**
|
||||
* Abstract class for CUDA evaluation of neighbor
|
||||
*/
|
||||
|
||||
template<class Neighbor>
|
||||
class moCudaEvalFunc {
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Define type of a solution corresponding to Neighbor
|
||||
*/
|
||||
|
||||
typedef typename Neighbor::EOT EOT;
|
||||
typedef typename EOT::Fitness Fitness;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
moCudaEvalFunc() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
|
||||
~moCudaEvalFunc() {
|
||||
}
|
||||
|
||||
/**
|
||||
*Virtual functor to compute fitness of a solution neighbor
|
||||
*@param _solution the solution which generate the neighborhood
|
||||
*@param _fitness the current solution fitness
|
||||
*@param _index the set of index helping to compute the neighbor fitness
|
||||
*/
|
||||
|
||||
virtual inline __host__ __device__ Fitness operator() (EOT & _solution,Fitness _fitness, unsigned int * _index)=0;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue