• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //=====================================================
2 // File   :  bench_static.hh
3 // Author :  L. Plagne <laurent.plagne@edf.fr)>
4 // Copyright (C) EDF R&D,  lun sep 30 14:23:16 CEST 2002
5 //=====================================================
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 //
20 #ifndef BENCH_STATIC_HH
21 #define BENCH_STATIC_HH
22 
23 #include "btl.hh"
24 #include "bench_parameter.hh"
25 #include <iostream>
26 #include "utilities.h"
27 #include "xy_file.hh"
28 #include "static/static_size_generator.hh"
29 #include "timers/portable_perf_analyzer.hh"
30 // #include "timers/mixed_perf_analyzer.hh"
31 // #include "timers/x86_perf_analyzer.hh"
32 
33 using namespace std;
34 
35 
36 template <template<class> class Perf_Analyzer, template<class> class Action, template<class,int> class Interface>
bench_static(void)37 BTL_DONT_INLINE  void bench_static(void)
38 {
39   if (BtlConfig::skipAction(Action<Interface<REAL_TYPE,10> >::name()))
40     return;
41 
42   string filename = "bench_" + Action<Interface<REAL_TYPE,10> >::name() + ".dat";
43 
44   INFOS("starting " << filename);
45 
46   const int max_size = TINY_MV_MAX_SIZE;
47 
48   std::vector<double> tab_mflops;
49   std::vector<double> tab_sizes;
50 
51   static_size_generator<max_size,Perf_Analyzer,Action,Interface>::go(tab_sizes,tab_mflops);
52 
53   dump_xy_file(tab_sizes,tab_mflops,filename);
54 }
55 
56 // default Perf Analyzer
57 template <template<class> class Action, template<class,int> class Interface>
bench_static(void)58 BTL_DONT_INLINE  void bench_static(void)
59 {
60   bench_static<Portable_Perf_Analyzer,Action,Interface>();
61   //bench_static<Mixed_Perf_Analyzer,Action,Interface>();
62   //bench_static<X86_Perf_Analyzer,Action,Interface>();
63 }
64 
65 #endif
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81