Commit dd25051c authored by Florent D'Halluin's avatar Florent D'Halluin Committed by Alexandre Duret-Lutz
Browse files

Replace timer and global_timer with cbs.

Note: bencher and global_bencher remain.

4 steps:
1) Remove the timer system.
2) Fix taf-kit.
3) Disable bench in data/automata.
4) Use cbs in algorithms/*.hxx and tools/*.hxx.

Most modifications were only macro renaming.

Tests:
/!\ make check should be done on this patch.
Taf-kit was quickly tested.
make bench was quickly tested as well.

Files patched:

1) Remove the timer system:

* include/vaucanson/misc/global_bencher.hh: New.
Gather bencher-related macros.  Bench using the timer from cbs.
* include/vaucanson/misc/global_timer.hh: Removed.
Remove timer-related macros, put the rest in global_bencher.hh.
* include/vaucanson/misc/usual_macros.hh: Include the proper files.
* include/Makefile.am: Add/remove files.
* include/vaucanson/misc/global_timer.hh,
* include/vaucanson/misc/timer.cc,
* include/vaucanson/misc/timer.hh,
* include/vaucanson/misc/timer.hxx,
* include/vaucanson/misc/timer_internal_gathering.cc,
* include/vaucanson/misc/timer_internal_gathering.hh,
* include/vaucanson/misc/timer_internal_gathering.hxx,
* include/vaucanson/misc/timer_internal_graph.cc,
* include/vaucanson/misc/timer_internal_graph.hh,
* include/vaucanson/misc/timer_internal_graph.hxx: Removed.

2) Fix taf-kit:

* taf-kit/src/common.hh,
* taf-kit/src/main.cc: Remove global_timer. Fix macros.

3) Disable bench in data/automata:

* data/automata/char-b/Makefile.am,
* data/automata/char-fmp-b/Makefile.am,
* data/automata/char-z/Makefile.am:
Set -DBENCH_DISABLED in AM_CPPFLAGS.

4) Use cbs in algorithms/*.hxx and tools/*.hxx:

* include/vaucanson/algorithms/accessible.hxx,
* include/vaucanson/algorithms/aci_canonical.hxx,
* include/vaucanson/algorithms/aut_projection.hxx,
* include/vaucanson/algorithms/aut_to_exp.hxx,
* include/vaucanson/algorithms/berry_sethi.hxx,
* include/vaucanson/algorithms/brzozowski.hxx,
* include/vaucanson/algorithms/complement.hxx,
* include/vaucanson/algorithms/complete.hxx,
* include/vaucanson/algorithms/composition_cover.hxx,
* include/vaucanson/algorithms/concatenate.hxx,
* include/vaucanson/algorithms/cut_up.hxx,
* include/vaucanson/algorithms/derived_term_automaton.hxx,
* include/vaucanson/algorithms/determinize.hxx,
* include/vaucanson/algorithms/domain.hxx,
* include/vaucanson/algorithms/eps_removal.hxx,
* include/vaucanson/algorithms/eps_removal_sp.hxx,
* include/vaucanson/algorithms/eval.hxx,
* include/vaucanson/algorithms/evaluation_fmp.hxx,
* include/vaucanson/algorithms/extension.hxx,
* include/vaucanson/algorithms/finite_support_conversion.hxx,
* include/vaucanson/algorithms/fmp_to_rw.hxx,
* include/vaucanson/algorithms/image.hxx,
* include/vaucanson/algorithms/invert.hxx,
* include/vaucanson/algorithms/is_ambiguous.hxx,
* include/vaucanson/algorithms/is_deterministic.hxx,
* include/vaucanson/algorithms/is_ltl.hxx,
* include/vaucanson/algorithms/is_normalized.hxx,
* include/vaucanson/algorithms/isomorph.hxx,
* include/vaucanson/algorithms/letter_to_letter_composition.h,
* include/vaucanson/algorithms/ltl_to_pair.hxx,
* include/vaucanson/algorithms/minimization_hopcroft.hxx,
* include/vaucanson/algorithms/minimization_moore.hxx,
* include/vaucanson/algorithms/normalized.hxx,
* include/vaucanson/algorithms/pair_to_fmp.hxx,
* include/vaucanson/algorithms/product.hxx,
* include/vaucanson/algorithms/projection.hxx,
* include/vaucanson/algorithms/realtime.hxx,
* include/vaucanson/algorithms/rw_composition.hxx,
* include/vaucanson/algorithms/search.hxx,
* include/vaucanson/algorithms/standard.hxx,
* include/vaucanson/algorithms/sub_automaton.hxx,
* include/vaucanson/algorithms/sub_normalize.hxx,
* include/vaucanson/algorithms/transpose.hxx,
* include/vaucanson/algorithms/trim.hxx,
* include/vaucanson/tools/io.hxx: Replace TIMER_SCOPED with
BENCH_TASK_SCOPED.
parent 9f8f9993
2009-04-11 d-halluin <d-halluin@lrde.epita.fr>
2009-04-09 d-halluin <d-halluin@lrde.epita.fr>
 
Update cbs.
 
CBS version: e97a404a44e5b5d19d4a869aa1f43524386c5b09.
See cbs/Changelog.
 
2009-04-10 d-halluin <d-halluin@lrde.epita.fr>
2009-04-11 d-halluin <d-halluin@lrde.epita.fr>
 
Update cbs.
Replace timer and global_timer with cbs.
 
CBS version: d60af6daaf8fa20e8a9fe92017fb69f4db30f9ba.
See cbs/Changelog.
Note: bencher and global_bencher remain.
 
2009-04-09 d-halluin <d-halluin@lrde.epita.fr>
4 steps:
1) Remove the timer system.
2) Fix taf-kit.
3) Disable bench in data/automata.
4) Use cbs in algorithms/*.hxx and tools/*.hxx.
 
Update cbs.
Most modifications were only macro renaming.
 
CBS version: bbef600f610af475eda1ace19a8ca60a30c1faca.
See cbs/Changelog.
Tests:
/!\ make check should be done on this patch.
Taf-kit was quickly tested.
make bench was quickly tested as well.
 
2009-04-06 d-halluin <d-halluin@lrde.epita.fr>
Files patched:
1) Remove the timer system:
* include/vaucanson/misc/global_bencher.hh: New.
Gather bencher-related macros. Bench using the timer from cbs.
* include/vaucanson/misc/global_timer.hh: Removed.
Remove timer-related macros, put the rest in global_bencher.hh.
* include/vaucanson/misc/usual_macros.hh: Include the proper files.
* include/Makefile.am: Add/remove files.
* include/vaucanson/misc/global_timer.hh,
* include/vaucanson/misc/timer.cc,
* include/vaucanson/misc/timer.hh,
* include/vaucanson/misc/timer.hxx,
* include/vaucanson/misc/timer_internal_gathering.cc,
* include/vaucanson/misc/timer_internal_gathering.hh,
* include/vaucanson/misc/timer_internal_gathering.hxx,
* include/vaucanson/misc/timer_internal_graph.cc,
* include/vaucanson/misc/timer_internal_graph.hh,
* include/vaucanson/misc/timer_internal_graph.hxx: Removed.
2) Fix taf-kit:
* taf-kit/src/common.hh,
* taf-kit/src/main.cc: Remove global_timer. Fix macros.
3) Disable bench in data/automata:
* data/automata/char-b/Makefile.am,
* data/automata/char-fmp-b/Makefile.am,
* data/automata/char-z/Makefile.am:
Set -DBENCH_DISABLED in AM_CPPFLAGS.
 
Use cbs for bench compilation.
4) Use cbs in algorithms/*.hxx and tools/*.hxx:
 
* src/bench/generate_bench.sh: Add LDADD in generated Makefile.am.
* vaucanson.mk: Add proper include flags.
* include/vaucanson/algorithms/accessible.hxx,
* include/vaucanson/algorithms/aci_canonical.hxx,
* include/vaucanson/algorithms/aut_projection.hxx,
* include/vaucanson/algorithms/aut_to_exp.hxx,
* include/vaucanson/algorithms/berry_sethi.hxx,
* include/vaucanson/algorithms/brzozowski.hxx,
* include/vaucanson/algorithms/complement.hxx,
* include/vaucanson/algorithms/complete.hxx,
* include/vaucanson/algorithms/composition_cover.hxx,
* include/vaucanson/algorithms/concatenate.hxx,
* include/vaucanson/algorithms/cut_up.hxx,
* include/vaucanson/algorithms/derived_term_automaton.hxx,
* include/vaucanson/algorithms/determinize.hxx,
* include/vaucanson/algorithms/domain.hxx,
* include/vaucanson/algorithms/eps_removal.hxx,
* include/vaucanson/algorithms/eps_removal_sp.hxx,
* include/vaucanson/algorithms/eval.hxx,
* include/vaucanson/algorithms/evaluation_fmp.hxx,
* include/vaucanson/algorithms/extension.hxx,
* include/vaucanson/algorithms/finite_support_conversion.hxx,
* include/vaucanson/algorithms/fmp_to_rw.hxx,
* include/vaucanson/algorithms/image.hxx,
* include/vaucanson/algorithms/invert.hxx,
* include/vaucanson/algorithms/is_ambiguous.hxx,
* include/vaucanson/algorithms/is_deterministic.hxx,
* include/vaucanson/algorithms/is_ltl.hxx,
* include/vaucanson/algorithms/is_normalized.hxx,
* include/vaucanson/algorithms/isomorph.hxx,
* include/vaucanson/algorithms/letter_to_letter_composition.h,
* include/vaucanson/algorithms/ltl_to_pair.hxx,
* include/vaucanson/algorithms/minimization_hopcroft.hxx,
* include/vaucanson/algorithms/minimization_moore.hxx,
* include/vaucanson/algorithms/normalized.hxx,
* include/vaucanson/algorithms/pair_to_fmp.hxx,
* include/vaucanson/algorithms/product.hxx,
* include/vaucanson/algorithms/projection.hxx,
* include/vaucanson/algorithms/realtime.hxx,
* include/vaucanson/algorithms/rw_composition.hxx,
* include/vaucanson/algorithms/search.hxx,
* include/vaucanson/algorithms/standard.hxx,
* include/vaucanson/algorithms/sub_automaton.hxx,
* include/vaucanson/algorithms/sub_normalize.hxx,
* include/vaucanson/algorithms/transpose.hxx,
* include/vaucanson/algorithms/trim.hxx,
* include/vaucanson/tools/io.hxx: Replace TIMER_SCOPED with
BENCH_TASK_SCOPED.
 
2009-04-06 d-halluin <d-halluin@lrde.epita.fr>
 
......
......@@ -15,6 +15,7 @@
include $(top_srcdir)/vaucanson.mk
LDADD = $(top_builddir)/lib/libvcsn-common.la
AM_CPPFLAGS += -DBENCH_DISABLED
noinst_PROGRAMS = a1 b1 divkbaseb ladybird double_ring
......
......@@ -15,6 +15,7 @@
include $(top_srcdir)/vaucanson.mk
LDADD = $(top_builddir)/lib/libvcsn-common.la
AM_CPPFLAGS += -DBENCH_DISABLED
noinst_PROGRAMS = t1 u1 quotkbaseb
......
......@@ -15,6 +15,7 @@
include $(top_srcdir)/vaucanson.mk
LDADD = $(top_builddir)/lib/libvcsn-common.la
AM_CPPFLAGS += -DBENCH_DISABLED
# Z automata.
noinst_PROGRAMS = c1 d1
......
......@@ -69,7 +69,7 @@ vaucanson/misc/escaper.hh \
vaucanson/misc/escaper.hxx \
vaucanson/misc/functors.hh \
vaucanson/misc/functors.hxx \
vaucanson/misc/global_timer.hh \
vaucanson/misc/global_bencher.hh \
vaucanson/misc/hash.hh \
vaucanson/misc/hash.hxx \
vaucanson/misc/iomanip.hh \
......@@ -87,15 +87,6 @@ vaucanson/misc/special_char_traits.hh \
vaucanson/misc/static.hh \
vaucanson/misc/support.hh \
vaucanson/misc/support.hxx \
vaucanson/misc/timer.hh \
vaucanson/misc/timer.hxx \
vaucanson/misc/timer.cc \
vaucanson/misc/timer_internal_gathering.hh \
vaucanson/misc/timer_internal_gathering.hxx \
vaucanson/misc/timer_internal_gathering.cc \
vaucanson/misc/timer_internal_graph.hh \
vaucanson/misc/timer_internal_graph.hxx \
vaucanson/misc/timer_internal_graph.cc \
vaucanson/misc/bencher.hh \
vaucanson/misc/bencher.hxx \
vaucanson/misc/bencher.cc \
......
......@@ -82,7 +82,7 @@ namespace vcsn {
std::set<typename Element<A, AI>::hstate_t>
accessible_states(const Element<A, AI>& a)
{
TIMER_SCOPED ("accessible_states");
BENCH_TASK_SCOPED("accessible_states");
return do_accessible_states(a.structure(), a);
}
......
......@@ -180,7 +180,7 @@ namespace vcsn
Element<S, SI>
canonical(const Element<S, SI>& exp)
{
TIMER_SCOPED ("canonical");
BENCH_TASK_SCOPED("canonical");
return do_canonical(exp.structure(), exp);
}
......
......@@ -28,7 +28,7 @@ namespace vcsn
typename projection_traits<S, T>::
first_projection_t& dst)
{
TIMER_SCOPED("first_projection");
BENCH_TASK_SCOPED("first_projection");
// Type helpers.
typedef Element<S, T> automaton_t;
......@@ -79,7 +79,7 @@ namespace vcsn
typename projection_traits<S, T>::
second_projection_t& dst)
{
TIMER_SCOPED("second_projection");
BENCH_TASK_SCOPED("second_projection");
// Type helpers.
typedef Element<S, T> automaton_t;
......
......@@ -358,7 +358,7 @@ namespace vcsn {
typename Element<A, AI>::series_set_elt_t
aut_to_exp(const Element<A, AI>& a, const Chooser& c)
{
TIMER_SCOPED("aut_to_exp");
BENCH_TASK_SCOPED("aut_to_exp");
Element<A, AI> ret(a);
return do_in_aut_to_exp(ret.structure(), ret, c);
}
......
......@@ -221,7 +221,7 @@ namespace vcsn {
void
berry_sethi(Element<A, T>& out, const Exp& kexp)
{
TIMER_SCOPED("berry_sethi");
BENCH_TASK_SCOPED("berry_sethi");
Element<A, T>* tmp = do_berry_sethi(out, kexp);
out = *tmp;
delete tmp;
......
......@@ -81,7 +81,7 @@ namespace vcsn {
void
brzozowski(Element<A, T>& out, const Exp& kexp)
{
TIMER_SCOPED("brzozowski");
BENCH_TASK_SCOPED("brzozowski");
out = *do_brzozowski(out, kexp);
}
......
......@@ -37,7 +37,7 @@ namespace vcsn {
void
complement_here(Element<A, AI>& a)
{
TIMER_SCOPED("complement");
BENCH_TASK_SCOPED("complement");
typedef Element<A, AI> automaton_t;
AUTOMATON_TYPES(automaton_t);
......
......@@ -42,7 +42,7 @@ namespace vcsn {
// Note that this algorithm may be used on non-deterministic
// automata.
precondition(is_realtime(work));
TIMER_SCOPED("complete");
BENCH_TASK_SCOPED("complete");
typedef Element<A, AI> automaton_t;
AUTOMATON_TYPES(automaton_t);
AUTOMATON_FREEMONOID_TYPES(automaton_t);
......@@ -107,7 +107,7 @@ namespace vcsn {
is_complete(const Element<A, AI>& e)
{
precondition(is_realtime(e));
TIMER_SCOPED("is_complete");
BENCH_TASK_SCOPED("is_complete");
if (e.states().size() == 0)
return false;
typedef Element<A, AI> automaton_t;
......
......@@ -43,7 +43,7 @@ namespace vcsn {
const Auto_t& fmp,
Auto_t& ret)
{
TIMER_SCOPED("composition_cover");
BENCH_TASK_SCOPED("composition_cover");
AUTOMATON_TYPES(Auto_t);
ret = splitting::outsplitting (fmp);
}
......@@ -56,7 +56,7 @@ namespace vcsn {
const Auto_t& fmp,
Auto_t& ret)
{
TIMER_SCOPED("composition_co_cover");
BENCH_TASK_SCOPED("composition_co_cover");
AUTOMATON_TYPES(Auto_t);
ret = splitting::insplitting (fmp);
}
......
......@@ -32,7 +32,7 @@ namespace vcsn {
Element<A, AI>& lhs,
const Element<A, AI>& rhs)
{
TIMER_SCOPED("concatentate");
BENCH_TASK_SCOPED("concatentate");
typedef Element<A, AI> automaton_t;
AUTOMATON_TYPES(automaton_t);
std::map<hstate_t, hstate_t> trans;
......
......@@ -36,7 +36,7 @@ namespace vcsn {
template <typename A, typename AI>
bool is_cut_up(const Element<A, AI>& a)
{
TIMER_SCOPED("is_cut_up");
BENCH_TASK_SCOPED("is_cut_up");
typedef Element<A, AI> automaton_t;
AUTOMATON_TYPES(automaton_t);
......@@ -149,7 +149,7 @@ namespace vcsn {
void
cut_up(const Element<A, AI>& a, Element<A, AI>& res)
{
TIMER_SCOPED("cut_up");
BENCH_TASK_SCOPED("cut_up");
typedef typename Element<A, AI>::series_set_elt_t::value_t series_impl_t;
do_cut_up(a.structure(), SELECT(series_impl_t), a, res);
}
......
......@@ -163,7 +163,7 @@ namespace vcsn {
void
derived_term_automaton(Element<A, T>& out, const Exp& kexp)
{
TIMER_SCOPED("derived_term_automaton");
BENCH_TASK_SCOPED("derived_term_automaton");
Element<A, T>* res = do_derived_term_automaton(out, kexp);
if (res)
out = *res;
......
......@@ -155,7 +155,7 @@ namespace vcsn {
std::map<typename Element<A, AI>::hstate_t,
std::set<typename Element<A, AI>::hstate_t> >& m)
{
TIMER_SCOPED ("determinize");
BENCH_TASK_SCOPED("determinize");
precondition(is_realtime(input));
do_subset_construction(a_set, output, input, m);
}
......
......@@ -30,7 +30,7 @@ namespace vcsn
void
do_fmp_domain(const src_t& src, dst_t& dst)
{
TIMER_SCOPED("fmp_domain");
BENCH_TASK_SCOPED("fmp_domain");
AUTOMATON_TYPES_(src_t, trans_);
AUTOMATON_TYPES(dst_t);
......@@ -74,7 +74,7 @@ namespace vcsn
void
do_rw_domain(const src_t& src, dst_t& dst)
{
TIMER_SCOPED("rw_domain");
BENCH_TASK_SCOPED("rw_domain");
std::map<typename src_t::hstate_t, typename dst_t::hstate_t> m;
AUTOMATON_TYPES(src_t);
......
......@@ -432,7 +432,7 @@ namespace vcsn {
Auto& a,
misc::direction_type dir)
{
TIMER_SCOPED("eps_removal");
BENCH_TASK_SCOPED("eps_removal");
EpsilonRemover<A_, Auto, Weight> algo(a_set, a);
algo(dir);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment