mixed_perf_analyzer.hh
Go to the documentation of this file.
1 //=====================================================
2 // File : mixed_perf_analyzer.hh
3 // Author : L. Plagne <laurent.plagne@edf.fr)>
4 // Copyright (C) EDF R&D, mar déc 3 18:59:36 CET 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 _MIXED_PERF_ANALYSER_HH
21 #define _MIXED_PERF_ANALYSER_HH
22 
23 #include "x86_perf_analyzer.hh"
25 
26 // choose portable perf analyzer for long calculations and x86 analyser for short ones
27 
28 
29 template<class Action>
31 
32 public:
34  {
35  MESSAGE("Mixed_Perf_Analyzer Ctor");
36  };
38  INFOS("Copy Ctor not implemented");
39  exit(0);
40  };
42  MESSAGE("Mixed_Perf_Analyzer Dtor");
43  };
44 
45 
46  inline double eval_mflops(int size)
47  {
48 
49  double result=0.0;
50  if (_use_ppa){
51  result=_ppa.eval_mflops(size);
52  if (_ppa.get_nb_calc()>DEFAULT_NB_SAMPLE){_use_ppa=false;}
53  }
54  else{
56  }
57 
58  return result;
59  }
60 
61 private:
62 
65  bool _use_ppa;
66 
67 };
68 
69 #endif
70 
71 
72 
73 
Mixed_Perf_Analyzer::Mixed_Perf_Analyzer
Mixed_Perf_Analyzer(void)
Definition: mixed_perf_analyzer.hh:33
Mixed_Perf_Analyzer::_x86pa
X86_Perf_Analyzer< Action > _x86pa
Definition: mixed_perf_analyzer.hh:64
Mixed_Perf_Analyzer::~Mixed_Perf_Analyzer
~Mixed_Perf_Analyzer(void)
Definition: mixed_perf_analyzer.hh:41
Mixed_Perf_Analyzer::eval_mflops
double eval_mflops(int size)
Definition: mixed_perf_analyzer.hh:46
x86_perf_analyzer.hh
result
Values result
Definition: OdometryOptimize.cpp:8
Portable_Perf_Analyzer
Definition: portable_perf_analyzer.hh:28
size
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
MESSAGE
#define MESSAGE(chain)
Definition: 3rdparty/Eigen/bench/btl/generic_bench/utils/utilities.h:76
portable_perf_analyzer.hh
X86_Perf_Analyzer< Action >
Mixed_Perf_Analyzer::_use_ppa
bool _use_ppa
Definition: mixed_perf_analyzer.hh:65
INFOS
#define INFOS(chain)
Definition: 3rdparty/Eigen/bench/btl/generic_bench/utils/utilities.h:22
Mixed_Perf_Analyzer::Mixed_Perf_Analyzer
Mixed_Perf_Analyzer(const Mixed_Perf_Analyzer &)
Definition: mixed_perf_analyzer.hh:37
DEFAULT_NB_SAMPLE
#define DEFAULT_NB_SAMPLE
Definition: bench_parameter.hh:48
Mixed_Perf_Analyzer::_ppa
Portable_Perf_Analyzer< Action > _ppa
Definition: mixed_perf_analyzer.hh:63
X86_Perf_Analyzer::eval_mflops
double eval_mflops(int size)
Definition: x86_perf_analyzer.hh:43
Mixed_Perf_Analyzer
Definition: mixed_perf_analyzer.hh:30


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:22