
* edwin/TreeAlgorithmsComp/Makefile: Minor fixes. * edwin/TreeAlgorithmsComp/bench.hh: Minor fixes. --- milena/sandbox/ChangeLog | 9 ++++++++ milena/sandbox/edwin/TreeAlgorithmsComp/Makefile | 1 + milena/sandbox/edwin/TreeAlgorithmsComp/bench.hh | 24 +++++++++++---------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index 5d3a05f..29b629c 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -1,5 +1,14 @@ +2010-09-30 edwin carlinet <carlinet@lrde.epita.fr> + + Minor fixes. + + * edwin/TreeAlgorithmsComp/Makefile: Minor fixes. + * edwin/TreeAlgorithmsComp/bench.hh: Minor fixes. + 2010-06-02 edwin carlinet <carlinet@lrde.epita.fr> + Minor fixes in component tree algorithms. + * edwin/TreeAlgorithmsComp/Makefile: New. * edwin/TreeAlgorithmsComp/bench.hh, * edwin/TreeAlgorithmsComp/nnodes.hh: Shared headers. diff --git a/milena/sandbox/edwin/TreeAlgorithmsComp/Makefile b/milena/sandbox/edwin/TreeAlgorithmsComp/Makefile index fea59aa..06e9df4 100644 --- a/milena/sandbox/edwin/TreeAlgorithmsComp/Makefile +++ b/milena/sandbox/edwin/TreeAlgorithmsComp/Makefile @@ -15,6 +15,7 @@ LDFLAGS = $(if $(WALL_CLOCK), -ltbb) CC = g++ tbb_CXXFLAGS = $(CXXFLAGS) -I $(TBB_INCLUDE_DIR) -DWALL_CLOCK +#tbb_CXXFLAGS += -DTRACE # pour debuguer les threads tbb_LDFLAGS = -L $(TBB_LIB_DIR) -ltbb TARGETS = \ diff --git a/milena/sandbox/edwin/TreeAlgorithmsComp/bench.hh b/milena/sandbox/edwin/TreeAlgorithmsComp/bench.hh index a68ab71..e6e6bdc 100644 --- a/milena/sandbox/edwin/TreeAlgorithmsComp/bench.hh +++ b/milena/sandbox/edwin/TreeAlgorithmsComp/bench.hh @@ -48,20 +48,22 @@ # else // !WALL_CLOCK # include <tbb/tick_count.h> +# include <cmath> -# define START_BENCH(N_ITERATION) \ - { \ +# define START_BENCH(N_ITERATION) \ + { \ + const int n_iteration__ = N_ITERATION; \ tbb::tick_count t0__ = tbb::tick_count::now(); \ - const int n_iteration__ = N_ITERATION; \ - for (int i__ = 0; i__ < n_iteration__; ++i__) { + for (int i__ = 0; i__ < n_iteration__; ++i__) { \ -# define END_BENCH(MSG) \ - } \ - tbb::tick_count t1__ = tbb::tick_count::now(); \ - std::cout << MSG \ - << (t1__ - t0__).seconds() * 1000 / n_iteration__ \ - << " ms." << std::endl; \ - } + +# define END_BENCH(MSG) \ + }; \ + tbb::tick_count t1__ = tbb::tick_count::now(); \ + std::cout << MSG \ + << (t1__ - t0__).seconds() * 1000 / n_iteration__ \ + << " ms ." << std::endl; \ + } # endif -- 1.5.6.5