From 01c35379bfed4fbe1ca5688ddadef13c96bd4ba6 Mon Sep 17 00:00:00 2001 From: boufaras Date: Wed, 14 Sep 2011 09:15:20 +0000 Subject: [PATCH] replace "srand()" by "rng.reseed()" and correct the printf of execution time git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2356 331e1502-861f-0410-8da2-ba01fb791d7f --- branches/ParadisEO-GPU/tutoriel/OneMax/testSimpleHC.cu | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/branches/ParadisEO-GPU/tutoriel/OneMax/testSimpleHC.cu b/branches/ParadisEO-GPU/tutoriel/OneMax/testSimpleHC.cu index 4b4946a40..24f9d9914 100644 --- a/branches/ParadisEO-GPU/tutoriel/OneMax/testSimpleHC.cu +++ b/branches/ParadisEO-GPU/tutoriel/OneMax/testSimpleHC.cu @@ -121,8 +121,6 @@ void main_function(int argc, char **argv) //reproducible random seed: if you don't change SEED above, // you'll aways get the same result, NOT a random run rng.reseed(seed); - srand(seed); - /* ========================================================= * @@ -209,9 +207,10 @@ void main_function(int argc, char **argv) timer.start(); localSearch(sol); timer.stop(); + std::cout << "final: " << sol << std::endl; printf("Execution time = %f ms\n",timer.getTime()); timer.deleteTimer(); - std::cout << "final: " << sol << std::endl; + /* ========================================================= *