bench_static.hh
Go to the documentation of this file.
00001 //=====================================================
00002 // File   :  bench_static.hh
00003 // Author :  L. Plagne <laurent.plagne@edf.fr)>
00004 // Copyright (C) EDF R&D,  lun sep 30 14:23:16 CEST 2002
00005 //=====================================================
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 //
00020 #ifndef BENCH_STATIC_HH
00021 #define BENCH_STATIC_HH
00022 
00023 #include "btl.hh"
00024 #include "bench_parameter.hh"
00025 #include <iostream>
00026 #include "utilities.h"
00027 #include "xy_file.hh"
00028 #include "static/static_size_generator.hh"
00029 #include "timers/portable_perf_analyzer.hh"
00030 // #include "timers/mixed_perf_analyzer.hh"
00031 // #include "timers/x86_perf_analyzer.hh"
00032 
00033 using namespace std;
00034 
00035 
00036 template <template<class> class Perf_Analyzer, template<class> class Action, template<class,int> class Interface>
00037 BTL_DONT_INLINE  void bench_static(void)
00038 {
00039   if (BtlConfig::skipAction(Action<Interface<REAL_TYPE,10> >::name()))
00040     return;
00041 
00042   string filename = "bench_" + Action<Interface<REAL_TYPE,10> >::name() + ".dat";
00043 
00044   INFOS("starting " << filename);
00045 
00046   const int max_size = TINY_MV_MAX_SIZE;
00047 
00048   std::vector<double> tab_mflops;
00049   std::vector<double> tab_sizes;
00050 
00051   static_size_generator<max_size,Perf_Analyzer,Action,Interface>::go(tab_sizes,tab_mflops);
00052 
00053   dump_xy_file(tab_sizes,tab_mflops,filename);
00054 }
00055 
00056 // default Perf Analyzer
00057 template <template<class> class Action, template<class,int> class Interface>
00058 BTL_DONT_INLINE  void bench_static(void)
00059 {
00060   bench_static<Portable_Perf_Analyzer,Action,Interface>();
00061   //bench_static<Mixed_Perf_Analyzer,Action,Interface>();
00062   //bench_static<X86_Perf_Analyzer,Action,Interface>();
00063 }
00064 
00065 #endif
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:30:47