From 04b1e301a7f53fe4368c64d19df4c4bd781e3e7b Mon Sep 17 00:00:00 2001 From: boufaras Date: Tue, 21 Dec 2010 16:46:25 +0000 Subject: [PATCH] git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2034 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/problems/eval/OneMaxIncrEval.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ParadisEO-GPU/src/problems/eval/OneMaxIncrEval.h b/ParadisEO-GPU/src/problems/eval/OneMaxIncrEval.h index d338f7e09..86bab069a 100644 --- a/ParadisEO-GPU/src/problems/eval/OneMaxIncrEval.h +++ b/ParadisEO-GPU/src/problems/eval/OneMaxIncrEval.h @@ -67,24 +67,24 @@ public: * Incremental evaluation of the solution(function inline can be called from host or device) * @param _bitVector the solution to evaluate * @param _fitness the fitness of the current solution - * @param _id the index of solution neighbor + * @param _index the index of solution neighbor */ - inline __host__ __device__ Fitness operator() (EOT & _bitVector,Fitness _fitness, unsigned _id) { +inline __host__ __device__ Fitness operator() (EOT & _bitVector,Fitness _fitness, unsigned int * _index) { - Fitness tmp; + Fitness tmp; - if (_bitVector[_id] == 0) + if (_bitVector[_index[0]] == 0) - tmp= _fitness+1; + tmp= _fitness+1; - else + else - tmp= _fitness-1; + tmp= _fitness-1; - return tmp; + return tmp; - } +} }; #endif