Patch from Karima.Boufaras@inria.fr: compilation wth CUDACC

This commit is contained in:
Johann Dreo 2010-09-03 15:55:28 +02:00
commit be19562147
3 changed files with 56 additions and 19 deletions

View file

@ -82,8 +82,14 @@ and minimizing fitness compares with greater. This because we want ordinary
fitness values (doubles) to be equivalent with Maximizing Fitness, and
comparing with less is the default behaviour.
*/
#if defined(__CUDACC__)
typedef eoScalarFitness<float, std::less<float> > eoMaximizingFitness;
typedef eoScalarFitness<float, std::greater<float> > eoMinimizingFitness;
#else
typedef eoScalarFitness<double, std::less<double> > eoMaximizingFitness;
typedef eoScalarFitness<double, std::greater<double> > eoMinimizingFitness;
#endif
template <class F, class Cmp>
std::ostream& operator<<(std::ostream& os, const eoScalarFitness<F, Cmp>& f)