
https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Ugo Jardonnet <ugo.jardonnet@lrde.epita.fr> Sandbox: ICP: Add bench script and clean testes up. * sandbox/jardonnet/test/bench.rb: New ruby bench script. * sandbox/jardonnet/test/plotscript: Usefull generated file. * sandbox/jardonnet/test/Makefile: Clean rules up. Remove useless files, now supported by icp.hh * sandbox/jardonnet/test/icp_subsampled.cc: Remove. * sandbox/jardonnet/test/icp_check.sh: Remove. * sandbox/jardonnet/test/icp_lazy.cc: Remove. Makefile | 53 +++++++++++++---------------------------------------- bench.rb | 33 +++++++++++++++++++++++++++++++++ icp.cc | 6 +++++- plotscript | 5 ----- 4 files changed, 51 insertions(+), 46 deletions(-) Index: sandbox/jardonnet/test/bench.rb --- sandbox/jardonnet/test/bench.rb (revision 0) +++ sandbox/jardonnet/test/bench.rb (revision 0) @@ -0,0 +1,33 @@ +#!/usr/bin/ruby + +system("make icp") + +plot_qe = File.new("log.dat", "w+") + +for q in 1..10 do + for e in 1..10 do + + t1 = Time.new + system("./icp 01.pbm 02.pbm #{q} #{e}") + t2 = Time.new + + print "#{q} #{e} #{t2-t1}\n" + plot_qe.puts "#{q} #{e} #{t2-t1}\n" + + end +end + +plot_qe.close + + +plotscipt = File.new("plotscript", "w+") +plotscipt.puts "set xlabel \"q\"" +plotscipt.puts "set ylabel \"e\"" +plotscipt.puts "set zlabel \"time\"" +plotscipt.puts "splot \"log.dat\"" +plotscipt.puts "pause -1" +plotscipt.close + +exec("gnuplot plotscript") + + Property changes on: sandbox/jardonnet/test/bench.rb ___________________________________________________________________ Name: svn:executable + * Index: sandbox/jardonnet/test/icp.cc --- sandbox/jardonnet/test/icp.cc (revision 1858) +++ sandbox/jardonnet/test/icp.cc (working copy) @@ -9,7 +9,8 @@ void usage(char *argv[]) { std::cout << "usage : " << argv[0] - << " cloud.pbm surface.pbm q e" << std::endl; + << " cloud.pbm surface.pbm q e" << std::endl + << " q >= 1 and e >= 1" << std::endl; exit(1); } @@ -22,6 +23,9 @@ float q = std::atof(argv[3]); int e = std::atoi(argv[4]); + if (q < 1 or e < 1) + usage(argv); + using namespace mln; typedef image3d< bool > I3d; Index: sandbox/jardonnet/test/plotscript --- sandbox/jardonnet/test/plotscript (revision 1858) +++ sandbox/jardonnet/test/plotscript (working copy) @@ -1,5 +1,5 @@ -set xlabel "k" -set ylabel "err" -set zlabel "dQk" -splot "log" -pause -1 \ No newline at end of file +set xlabel "q" +set ylabel "e" +set zlabel "time" +splot "log.dat" +pause 10 Index: sandbox/jardonnet/test/Makefile --- sandbox/jardonnet/test/Makefile (revision 1858) +++ sandbox/jardonnet/test/Makefile (working copy) @@ -1,56 +1,29 @@ SOURCE=test.cc subsampling.cc FLAG=-Wall -W -pedantic -I../../.. -g -all: sub gsub gau icp - +all: + echo "sub gsub gau icpD icp check bench" sub: - g++ subsampling.cc $(FLAG) -o '+sub.exe' + g++ subsampling.cc $(FLAG) -o 'sub' gsub: - g++ gaussian_subsampling.cc $(FLAG) -o '+gsub.exe' + g++ gaussian_subsampling.cc $(FLAG) -o 'gsub' gau: - g++ gaussian.cc $(FLAG) -o '+gau.exe' - -run: - time ./+sub.exe . . ; time ./+gsub.exe . . - - -icp: - g++ icp.cc -I../../.. -g -o '+icp.exe' -icp++: - g++ icp.cc -I../../.. -O3 -DNDEBUG -o '+icp.exe' - -icp_max++: - g++ icp_max.cc -I../../.. -O3 -DNDEBUG -pg -o '+icp_map.exe' - -icp_lazy++: - g++ icp_lazy.cc -I../../.. -O3 -DNDEBUG -pg -o '+icp_lazy.exe' - - -icp_sub: - g++ icp_subsampled.cc -I../../.. -O3 -DNDEBUG -g -o '+icp_sub.exe' - -icpsafe: - g++ icp.cc -fsignaling-nans -ffloat-store -I../../.. -O1 -o '+icp.exe' + g++ gaussian.cc $(FLAG) -o 'gau' -plot: icp - ./+icp.exe 01.pbm 02.pbm > log - gnuplot plotscript +icpD: icp.cc + g++ icp.cc -I../../.. -g -o 'icpD' +icp: icp.cc + g++ icp.cc -I../../.. -O3 -DNDEBUG -o 'icp' -check: clean - g++ icp.cc -I../../.. -O0 -o './bin/+icp_0' - g++ icp.cc -I../../.. -O0 -ffloat-store -o './bin/+icp_0f' - g++ icp.cc -I../../.. -O0 -DNDEBUG -o './bin/+icp_0D' - g++ icp.cc -I../../.. -O0 -DNDEBUG -ffloat-store -o './bin/+icp_0Df' - g++ icp.cc -I../../.. -O3 -o './bin/+icp_3' - g++ icp.cc -I../../.. -O3 -ffloat-store -o './bin/+icp_3f' - g++ icp.cc -I../../.. -O3 -DNDEBUG -o './bin/+icp_3D' - g++ icp.cc -I../../.. -O3 -DNDEBUG -ffloat-store -o './bin/+icp_3Df' - ./icp_check.sh +bench: + ./check.rb clean: rm -f -- ./bin/* + rm -f sub gsub gau icpD icp + rm -f log.dat registred.pbm .PHONY: check \ No newline at end of file