clear and update srcs with # change

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2640 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2012-01-12 10:31:27 +00:00
commit 0dfc55e53d
7 changed files with 47 additions and 43 deletions

View file

@ -37,6 +37,10 @@ CUDA_ADD_EXECUTABLE(GPUtestSimpleHCByCpy testSimpleHCByCpy.cu)
CUDA_ADD_EXECUTABLE(GPUtestSimpleTS testSimpleTS.cu)
CUDA_ADD_EXECUTABLE(GPUtestSimulatedAnnealing testSimulatedAnnealing.cu)
######################################################################################
### 4) Link the librairies for your target(s)
######################################################################################
TARGET_LINK_LIBRARIES(GPUtestFirstImpr eoutils ga eo)
TARGET_LINK_LIBRARIES(GPUtestNeutralHC eoutils ga eo)
TARGET_LINK_LIBRARIES(GPUtestSimpleHC eoutils ga eo)

View file

@ -42,11 +42,11 @@ using namespace std;
#include <eo>
#include <ga.h>
// OneMax full eval function
#include <problems/eval/EvalOneMax.h>
#include <problems/eval/moGPUEvalOneMax.h>
//Parallel evaluation of neighborhood on GPU
#include <eval/moGPUEvalByModif.h>
// OneMax increment evaluation function
#include <problems/eval/OneMaxIncrEval.h>
#include <problems/eval/moGPUOneMaxIncrEval.h>
// One Max solution
#include <GPUType/moGPUBitVector.h>
// Bit neighbor
@ -134,7 +134,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
EvalOneMax<solution> eval;
moGPUEvalOneMax<solution> eval;
/* =========================================================
*
@ -142,8 +142,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
OneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,OneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
moGPUOneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,moGPUOneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
/* =========================================================
*
@ -151,8 +151,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
moNeighborComparator<Neighbor> comparator;
moSolNeighborComparator<Neighbor> solComparator;
moNeighborComparator<Neighbor> comparator;
moSolNeighborComparator<Neighbor> solComparator;
/* =========================================================
*

View file

@ -42,11 +42,11 @@ using namespace std;
#include <eo>
#include <ga.h>
// OneMax full eval function
#include <problems/eval/EvalOneMax.h>
#include <problems/eval/moGPUEvalOneMax.h>
//Parallel evaluation of neighborhood on GPU
#include <eval/moGPUEvalByModif.h>
// OneMax increment evaluation function
#include <problems/eval/OneMaxIncrEval.h>
#include <problems/eval/moGPUOneMaxIncrEval.h>
// One Max solution
#include <GPUType/moGPUBitVector.h>
// Bit neighbor
@ -137,7 +137,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
EvalOneMax<solution> eval;
moGPUEvalOneMax<solution> eval;
/* =========================================================
*
@ -145,8 +145,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
OneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,OneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
moGPUOneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,moGPUOneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
/* =========================================================
*

View file

@ -43,11 +43,11 @@ using namespace std;
#include <eo>
#include <ga.h>
// OneMax full eval function
#include <problems/eval/EvalOneMax.h>
#include <problems/eval/moGPUEvalOneMax.h>
//Parallel evaluation of neighborhood on GPU
#include <eval/moGPUEvalByModif.h>
// OneMax increment evaluation function
#include <problems/eval/OneMaxIncrEval.h>
#include <problems/eval/moGPUOneMaxIncrEval.h>
// One Max solution
#include <GPUType/moGPUBitVector.h>
// Bit neighbor
@ -136,7 +136,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
EvalOneMax<solution> eval;
moGPUEvalOneMax<solution> eval;
/* =========================================================
*
@ -144,8 +144,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
OneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,OneMaxIncrEval<Neighbor> > cueval(SIZE,incr_eval);
moGPUOneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,moGPUOneMaxIncrEval<Neighbor> > cueval(SIZE,incr_eval);
/* =========================================================
*

View file

@ -43,11 +43,11 @@ using namespace std;
#include <eo>
#include <ga.h>
// One Max full eval function
#include <problems/eval/EvalOneMax.h>
#include <problems/eval/moGPUEvalOneMax.h>
//Parallel evaluation of neighborhood on GPU
#include <eval/moGPUEvalByCpy.h>
// One Max increment evaluation function
#include <problems/eval/OneMaxIncrEval.h>
#include <problems/eval/moGPUOneMaxIncrEval.h>
// One Max solution
#include <GPUType/moGPUBitVector.h>
// Bit neighbor
@ -137,7 +137,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
EvalOneMax<solution> eval;
moGPUEvalOneMax<solution> eval;
/* =========================================================
*
@ -145,8 +145,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
OneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByCpy<Neighbor,OneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
moGPUOneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByCpy<Neighbor,moGPUOneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
/* =========================================================
*

View file

@ -42,11 +42,11 @@ using namespace std;
#include <eo>
#include <ga.h>
// OneMax full eval function
#include <problems/eval/EvalOneMax.h>
#include <problems/eval/moGPUEvalOneMax.h>
//Parallel evaluation of neighborhood on GPU
#include <eval/moGPUEvalByModif.h>
// OneMax increment evaluation function
#include <problems/eval/OneMaxIncrEval.h>
#include <problems/eval/moGPUOneMaxIncrEval.h>
// One Max solution
#include <GPUType/moGPUBitVector.h>
// Bit neighbor
@ -143,7 +143,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
EvalOneMax<solution> eval;
moGPUEvalOneMax<solution> eval;
/* =========================================================
*
@ -151,8 +151,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
OneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,OneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
moGPUOneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,moGPUOneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
/* =========================================================
*

View file

@ -43,11 +43,11 @@ using namespace std;
#include <eo>
#include <ga.h>
// OneMax full eval function
#include <problems/eval/EvalOneMax.h>
#include <problems/eval/moGPUEvalOneMax.h>
//Parallel evaluation of neighborhood on GPU
#include <eval/moGPUEvalByModif.h>
// OneMax increment eval function
#include <problems/eval/OneMaxIncrEval.h>
#include <problems/eval/moGPUOneMaxIncrEval.h>
// One Max solution
#include <GPUType/moGPUBitVector.h>
// Bit neighbor
@ -137,7 +137,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
EvalOneMax<solution> eval;
moGPUEvalOneMax<solution> eval;
/* =========================================================
*
@ -145,8 +145,8 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
OneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,OneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
moGPUOneMaxIncrEval<Neighbor> incr_eval;
moGPUEvalByModif<Neighbor,moGPUOneMaxIncrEval<Neighbor> > gpuEval(SIZE,incr_eval);
/* =========================================================
*
@ -154,7 +154,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
Neighborhood neighborhood(SIZE,gpuEval);
Neighborhood neighborhood(SIZE,gpuEval);
/* =========================================================
*
@ -163,8 +163,8 @@ void main_function(int argc, char **argv)
* ========================================================= */
// initial temp, factor of decrease, number of steps without decrease, final temp.
moSimpleCoolingSchedule<solution> coolingSchedule(500, 0.9, 1000, 0.01);
// initial temp, factor of decrease, number of steps without decrease, final temp.
moSimpleCoolingSchedule<solution> coolingSchedule(500, 0.9, 1000, 0.01);
/* =========================================================
*
@ -172,7 +172,7 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
moSA<Neighbor> SA(neighborhood, eval, gpuEval,coolingSchedule);
moSA<Neighbor> SA(neighborhood, eval, gpuEval,coolingSchedule);
/* =========================================================
*
@ -180,13 +180,13 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
//init(solution);
eval(sol);
std::cout << "initial : " << sol << std::endl;
moGPUTimer timer;
timer.start();
SA(sol);
timer.stop();
//init(solution);
eval(sol);
std::cout << "initial : " << sol << std::endl;
moGPUTimer timer;
timer.start();
SA(sol);
timer.stop();
std::cout << "final : " << sol << std::endl;
printf("Execution time = %.2lf s\n",timer.getTime());