Sacado Package Browser (Single Doxygen Collection)  Version of the Day
Sacado_ScalarFlopCounter.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Sacado Package
5 // Copyright (2006) Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
25 // (etphipp@sandia.gov).
26 //
27 // ***********************************************************************
28 // @HEADER
29 
30 #ifndef SACADO_SCALAR_FLOP_COUNTER_HPP
31 #define SACADO_SCALAR_FLOP_COUNTER_HPP
32 
33 #include "Sacado_ConfigDefs.h"
35 #include "Sacado_Base.hpp"
36 #include "Sacado_SFINAE_Macros.hpp"
37 #include <cmath>
38 #include <algorithm> // for std::min and std::max
39 #include <ostream> // for std::ostream
40 
41 namespace Sacado {
42 
43  namespace FlopCounterPack {
44 
46  class FlopCounts {
47  public:
48 
49 #ifdef HAVE_SACADO_CXX11
50  enum { NUM_OPS = 35 };
52 #else
53  enum { NUM_OPS = 34 };
55 #endif
56  enum EFlopType {
74  ,EXP
75  ,LOG
78 #ifdef HAVE_SACADO_CXX11
79  ,CBRT
80 #endif
81  ,COS
82  ,SIN
83  ,TAN
91  ,ABS
92  ,POW
93  ,MAX
94  ,MIN
95  };
96 
98  enum { NUM_SUMMARY_OPS = 6 };
99 
108  };
109 
111  static const char* flopCountsNames[NUM_OPS];
112 
115 
125  static unsigned int flopGranularity;
126 
129 
132 
135 
137  FlopCounts();
138 
140  void reset();
141 
143  void finalize();
144 
146  void increment(EFlopType ft);
147 
148  private:
149 
152 
154  unsigned int partialFlopCounts[NUM_OPS];
155 
158  };
159 
175  std::ostream& printCountersTable(const int n,
176  const char* names[],
177  const char* abbr[],
178  const FlopCounts counts[],
179  std::ostream &out);
180 
181  //
182  // Member macros
183  //
184 
186 #define SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN( OP, OP_NAME ) \
187  ScalarFlopCounter<T> operator OP ( const ScalarFlopCounter<T>& s ) \
188  { \
189  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
190  val_ OP s.val(); \
191  return *this; \
192  }
193 
199  template<class T>
200  class ScalarFlopCounter : public Base< ScalarFlopCounter<T> > {
201  public:
202 
205 
208 
210  template <typename U>
211  struct apply {
213  };
214 
217 
219  static void resetCounters() { flopCounts_.reset(); }
220 
222  static void finalizeCounters() { flopCounts_.finalize(); }
223 
225  static FlopCounts getCounters() { return flopCounts_; }
226 
231  static std::ostream& printCounters( std::ostream &out ) {
232  const int n = 1;
233  const char* names[n] = { "Current" };
234  const char* abbr[n] = { "count" };
235  const FlopCounts counts[n] = { flopCounts_ };
236  return printCountersTable( n, &names[0], &abbr[0], &counts[0], out );
237  }
238 
240 
243 
246 
248  template <typename S>
250 
252  const T& val() const { return val_; }
253 
255  void val(const T& a) { val_ = a; }
256 
262 
264 
265  private:
266 
267  // Static members
269 
270  // Object members
272 
273  public:
274 
277 
283  static void incrCounter( const FlopCounts::EFlopType& ft ) {
285  }
286 
288  };
289 
290  // Static data members
291 
292  template<class T> FlopCounts ScalarFlopCounter<T>::flopCounts_;
293 
294  // ////////////////////////////////////////
295  // Nonmember operator function macros
296 
297 #define SCALAR_FLOP_COUNTER_BINARY_OP( OP, OP_NAME ) \
298  template<class T> \
299  ScalarFlopCounter<T> operator OP ( \
300  const Base< ScalarFlopCounter<T> >& aa, \
301  const Base< ScalarFlopCounter<T> >& bb ) \
302  { \
303  const ScalarFlopCounter<T>& a = aa.derived(); \
304  const ScalarFlopCounter<T>& b = bb.derived(); \
305  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
306  return ScalarFlopCounter<T>(a.val() OP b.val()); \
307  } \
308  template<class T> \
309  ScalarFlopCounter<T> operator OP ( \
310  const typename ScalarFlopCounter<T>::value_type& a, \
311  const Base< ScalarFlopCounter<T> >& bb ) \
312  { \
313  const ScalarFlopCounter<T>& b = bb.derived(); \
314  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
315  return ScalarFlopCounter<T>(a OP b.val()); \
316  } \
317  template<class T> \
318  ScalarFlopCounter<T> operator OP ( \
319  const int& a, \
320  const Base< ScalarFlopCounter<T> >& bb ) \
321  { \
322  const ScalarFlopCounter<T>& b = bb.derived(); \
323  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
324  return ScalarFlopCounter<T>(a OP b.val()); \
325  } \
326  template<class T> \
327  ScalarFlopCounter<T> operator OP ( \
328  const Base< ScalarFlopCounter<T> >& aa, \
329  const typename ScalarFlopCounter<T>::value_type& b ) \
330  { \
331  const ScalarFlopCounter<T>& a = aa.derived(); \
332  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
333  return ScalarFlopCounter<T>(a.val() OP b); \
334  } \
335  template<class T> \
336  ScalarFlopCounter<T> operator OP ( \
337  const Base< ScalarFlopCounter<T> >& aa, \
338  const int& b ) \
339  { \
340  const ScalarFlopCounter<T>& a = aa.derived(); \
341  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
342  return ScalarFlopCounter<T>(a.val() OP b); \
343  }
344 
345 #define SCALAR_FLOP_COUNTER_UNARY_OP( OP, OP_NAME ) \
346  template<class T> \
347  ScalarFlopCounter<T> operator OP ( \
348  const Base< ScalarFlopCounter<T> >& aa ) \
349  { \
350  const ScalarFlopCounter<T>& a = aa.derived(); \
351  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
352  return ScalarFlopCounter<T>( OP a.val() ); \
353  }
354 
355 #define SCALAR_FLOP_COUNTER_UNARY_FUNC( OP, OP_NAME ) \
356  template<class T> \
357  ScalarFlopCounter<T> OP( \
358  const Base< ScalarFlopCounter<T> >& aa ) \
359  { \
360  const ScalarFlopCounter<T>& a = aa.derived(); \
361  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
362  return ScalarFlopCounter<T>( std::OP( a.val() ) ); \
363  }
364 
365 #define SCALAR_FLOP_COUNTER_BINARY_FUNC( OP, OP_NAME ) \
366  template<class T> \
367  ScalarFlopCounter<T> OP ( \
368  const Base< ScalarFlopCounter<T> >& aa, \
369  const Base< ScalarFlopCounter<T> >& bb ) \
370  { \
371  const ScalarFlopCounter<T>& a = aa.derived(); \
372  const ScalarFlopCounter<T>& b = bb.derived(); \
373  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
374  return ScalarFlopCounter<T>( std::OP( a.val(), b.val() ) ); \
375  } \
376  template<class T> \
377  ScalarFlopCounter<T> OP ( \
378  const typename ScalarFlopCounter<T>::value_type& a, \
379  const Base< ScalarFlopCounter<T> >& bb ) \
380  { \
381  const ScalarFlopCounter<T>& b = bb.derived(); \
382  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
383  return ScalarFlopCounter<T>( std::OP( a, b.val() ) ); \
384  } \
385  template<class T> \
386  ScalarFlopCounter<T> OP ( \
387  const int& a, \
388  const Base< ScalarFlopCounter<T> >& bb ) \
389  { \
390  const ScalarFlopCounter<T>& b = bb.derived(); \
391  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
392  return ScalarFlopCounter<T>( std::OP( a, b.val() ) ); \
393  } \
394  template<class T> \
395  ScalarFlopCounter<T> OP ( \
396  const Base< ScalarFlopCounter<T> >& aa, \
397  const typename ScalarFlopCounter<T>::value_type& b ) \
398  { \
399  const ScalarFlopCounter<T>& a = aa.derived(); \
400  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
401  return ScalarFlopCounter<T>( std::OP( a.val(), b ) ); \
402  } \
403  template<class T> \
404  ScalarFlopCounter<T> OP ( \
405  const Base< ScalarFlopCounter<T> >& aa, \
406  const int& b ) \
407  { \
408  const ScalarFlopCounter<T>& a = aa.derived(); \
409  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
410  return ScalarFlopCounter<T>( std::OP(a.val(), b ) ); \
411  }
412 
413 #define SCALAR_FLOP_COUNTER_BINARY_COMPARISON_OP( OP, OP_NAME ) \
414  template<class T> \
415  bool operator OP ( \
416  const Base< ScalarFlopCounter<T> >& aa, \
417  const Base< ScalarFlopCounter<T> >& bb ) \
418  { \
419  const ScalarFlopCounter<T>& a = aa.derived(); \
420  const ScalarFlopCounter<T>& b = bb.derived(); \
421  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
422  return (a.val() OP b.val()); \
423  } \
424  template<class T> \
425  bool operator OP ( \
426  const typename ScalarFlopCounter<T>::value_type& a, \
427  const Base< ScalarFlopCounter<T> >& bb ) \
428  { \
429  const ScalarFlopCounter<T>& b = bb.derived(); \
430  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
431  return (a OP b.val()); \
432  } \
433  template<class T> \
434  bool operator OP ( \
435  const Base< ScalarFlopCounter<T> >& aa, \
436  const typename ScalarFlopCounter<T>::value_type& b ) \
437  { \
438  const ScalarFlopCounter<T>& a = aa.derived(); \
439  ScalarFlopCounter<T>::incrCounter(OP_NAME); \
440  return (a.val() OP b); \
441  }
442 
443  // ////////////////////////////////////////////
444  // Nonmember operator and other functions
445 
446  // Binary operations
451 
452  // Unary operations
455 
456  // Unary functions
461 #ifdef HAVE_SACADO_CXX11
462  SCALAR_FLOP_COUNTER_UNARY_FUNC(cbrt,FlopCounts::CBRT)
463 #endif
475 
476  // Binary functions
481 
482  // Comparison
488 
489  } // namespace FlopCounterPack
490 } // namespace Sacado
491 
492 #endif // SACADO_SCALAR_FLOP_COUNTER_HPP
Sacado::FlopCounterPack::FlopCounts::LESS_THAN_EQUAL
Definition: Sacado_ScalarFlopCounter.hpp:72
sqrt
sqrt(expr.val())
Sacado::FlopCounterPack::FlopCounts::MULTIPLY
Definition: Sacado_ScalarFlopCounter.hpp:65
Sacado::FlopCounterPack::ScalarFlopCounter::val
const T & val() const
Return the current value.
Definition: Sacado_ScalarFlopCounter.hpp:252
Sacado::FlopCounterPack::ScalarFlopCounter::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN
SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN(=, FlopCounts::ASSIGN)
Sacado::FlopCounterPack::ScalarFlopCounter::value_type
RemoveConst< T >::type value_type
Typename of values.
Definition: Sacado_ScalarFlopCounter.hpp:204
Sacado::FlopCounterPack::FlopCounts::ATAN2
Definition: Sacado_ScalarFlopCounter.hpp:87
SCALAR_FLOP_COUNTER_UNARY_OP
#define SCALAR_FLOP_COUNTER_UNARY_OP(OP, OP_NAME)
Definition: Sacado_ScalarFlopCounter.hpp:345
SCALAR_FLOP_COUNTER_BINARY_COMPARISON_OP
#define SCALAR_FLOP_COUNTER_BINARY_COMPARISON_OP(OP, OP_NAME)
Definition: Sacado_ScalarFlopCounter.hpp:413
SCALAR_FLOP_COUNTER_BINARY_OP
#define SCALAR_FLOP_COUNTER_BINARY_OP(OP, OP_NAME)
Definition: Sacado_ScalarFlopCounter.hpp:297
Sacado::FlopCounterPack::FlopCounts::SUMMARY_DIVIDE
Definition: Sacado_ScalarFlopCounter.hpp:105
sin
sin(expr.val())
cosh
cosh(expr.val())
Sacado::FlopCounterPack::ScalarFlopCounter::val
void val(const T &a)
Set the current value.
Definition: Sacado_ScalarFlopCounter.hpp:255
Sacado::FlopCounterPack::FlopCounts::finalize
void finalize()
Definition: Sacado_ScalarFlopCounter.cpp:110
Sacado::FlopCounterPack::FlopCounts::flopGranularity
static unsigned int flopGranularity
The number of flops to accumulate as an integer before converting to a double.
Definition: Sacado_ScalarFlopCounter.hpp:125
Sacado::FlopCounterPack::FlopCounts::flopCounts
double flopCounts[NUM_OPS]
Individual flop counts.
Definition: Sacado_ScalarFlopCounter.hpp:128
Sacado::FlopCounterPack::FlopCounts::LOG10
Definition: Sacado_ScalarFlopCounter.hpp:76
SCALAR_FLOP_COUNTER_BINARY_FUNC
#define SCALAR_FLOP_COUNTER_BINARY_FUNC(OP, OP_NAME)
Definition: Sacado_ScalarFlopCounter.hpp:365
Sacado::FlopCounterPack::FlopCounts::getSummaryType
ESummaryFlopType getSummaryType(EFlopType ft)
Get summary op enum from op enum.
Definition: Sacado_ScalarFlopCounter.cpp:143
log
log(expr.val())
Sacado::FlopCounterPack::FlopCounts::GREATER_THAN
Definition: Sacado_ScalarFlopCounter.hpp:69
Sacado::FlopCounterPack::FlopCounts::FlopCounts
FlopCounts()
Default constructor.
Definition: Sacado_ScalarFlopCounter.cpp:93
atan2
atan2(expr1.val(), expr2.val())
Sacado::FlopCounterPack::FlopCounts::increment
void increment(EFlopType ft)
Increment an individual flop counter.
Definition: Sacado_ScalarFlopCounter.cpp:126
Sacado::FlopCounterPack::FlopCounts::SQRT
Definition: Sacado_ScalarFlopCounter.hpp:77
cbrt
cbrt(expr.val())
Sacado::FlopCounterPack::FlopCounts
Class storing flop counts and summary flop counts.
Definition: Sacado_ScalarFlopCounter.hpp:46
Sacado::FlopCounterPack::ScalarFlopCounter::ScalarFlopCounter
ScalarFlopCounter()
Construct to uninitialized.
Definition: Sacado_ScalarFlopCounter.hpp:245
Sacado::FlopCounterPack::FlopCounts::DIVIDE_ASSIGN
Definition: Sacado_ScalarFlopCounter.hpp:68
asin
asin(expr.val())
Sacado::FlopCounterPack::ScalarFlopCounter::apply
Turn ScalarFlopCounter into a meta-function class usable with mpl::apply.
Definition: Sacado_ScalarFlopCounter.hpp:211
Sacado::FlopCounterPack::printCountersTable
std::ostream & printCountersTable(const int n, const char *names[], const char *abbr[], const FlopCounts counts[], std::ostream &out)
Print a list of flop counts into a single table.
Definition: Sacado_ScalarFlopCounter.cpp:199
SACADO_ENABLE_VALUE_CTOR_DECL
#define SACADO_ENABLE_VALUE_CTOR_DECL
Definition: Sacado_SFINAE_Macros.hpp:61
Sacado::FlopCounterPack::FlopCounts::SUMMARY_PLUS_MINUS
Definition: Sacado_ScalarFlopCounter.hpp:103
Sacado::FlopCounterPack::FlopCounts::TANH
Definition: Sacado_ScalarFlopCounter.hpp:90
Sacado::FlopCounterPack::ScalarFlopCounter::finalizeCounters
static void finalizeCounters()
Finalize total flop count after block of computations.
Definition: Sacado_ScalarFlopCounter.hpp:222
Sacado::ScalarType::type
T type
Definition: Sacado_Traits.hpp:304
log10
log10(expr.val())
T
#define T
Definition: Sacado_rad.hpp:573
Sacado::FlopCounterPack::FlopCounts::SIN
Definition: Sacado_ScalarFlopCounter.hpp:82
Sacado::FlopCounterPack::FlopCounts::partialFlopCounts
unsigned int partialFlopCounts[NUM_OPS]
Partial sum of individual flop counts.
Definition: Sacado_ScalarFlopCounter.hpp:154
Sacado::FlopCounterPack::FlopCounts::MAX
Definition: Sacado_ScalarFlopCounter.hpp:93
Sacado::FlopCounterPack::FlopCounts::summaryFlopCountsNames
static const char * summaryFlopCountsNames[NUM_SUMMARY_OPS]
Names for summary operation categories.
Definition: Sacado_ScalarFlopCounter.hpp:114
Sacado::Base
Base class for Sacado types to control overload resolution.
Definition: Sacado_Base.hpp:46
Sacado::FlopCounterPack::FlopCounts::UNARY_PLUS
Definition: Sacado_ScalarFlopCounter.hpp:61
Sacado::FlopCounterPack::FlopCounts::ASSIGN
Definition: Sacado_ScalarFlopCounter.hpp:58
Sacado::FlopCounterPack::FlopCounts::MULTIPLY_ASSIGN
Definition: Sacado_ScalarFlopCounter.hpp:66
tan
tan(expr.val())
abs
abs(expr.val())
Sacado::FlopCounterPack::FlopCounts::EQUAL
Definition: Sacado_ScalarFlopCounter.hpp:73
fabs
fabs(expr.val())
SCALAR_FLOP_COUNTER_UNARY_FUNC
#define SCALAR_FLOP_COUNTER_UNARY_FUNC(OP, OP_NAME)
Definition: Sacado_ScalarFlopCounter.hpp:355
Sacado_Base.hpp
exp
exp(expr.val())
Sacado::FlopCounterPack::FlopCounts::SUMMARY_ASSIGN
Definition: Sacado_ScalarFlopCounter.hpp:102
Sacado::FlopCounterPack::FlopCounts::SUMMARY_NONLINEAR
Definition: Sacado_ScalarFlopCounter.hpp:107
Sacado::FlopCounterPack::FlopCounts::MINUS
Definition: Sacado_ScalarFlopCounter.hpp:62
Sacado::FlopCounterPack::FlopCounts::LOG
Definition: Sacado_ScalarFlopCounter.hpp:75
Sacado::FlopCounterPack::FlopCounts::PLUS_ASSIGN
Definition: Sacado_ScalarFlopCounter.hpp:60
Sacado::FlopCounterPack::FlopCounts::EFlopType
EFlopType
Enum for operations.
Definition: Sacado_ScalarFlopCounter.hpp:57
Sacado::FlopCounterPack::ScalarFlopCounter::val_
T val_
Definition: Sacado_ScalarFlopCounter.hpp:271
Sacado::Fad::min
SimpleFad< ValueT > min(const SimpleFad< ValueT > &a, const SimpleFad< ValueT > &b)
Definition: Sacado_Fad_SimpleFadOps.hpp:498
Sacado::FlopCounterPack::FlopCounts::COSH
Definition: Sacado_ScalarFlopCounter.hpp:88
Sacado::FlopCounterPack::FlopCounts::ASIN
Definition: Sacado_ScalarFlopCounter.hpp:85
Sacado::FlopCounterPack::ScalarFlopCounter::apply::type
ScalarFlopCounter< U > type
Definition: Sacado_ScalarFlopCounter.hpp:212
Sacado
Definition: Sacado_mpl_apply.hpp:39
Sacado::FlopCounterPack::ScalarFlopCounter::resetCounters
static void resetCounters()
Reset static flop counters before starting a block of computations.
Definition: Sacado_ScalarFlopCounter.hpp:219
Sacado::FlopCounterPack::FlopCounts::ESummaryFlopType
ESummaryFlopType
Enum of summary operation categories.
Definition: Sacado_ScalarFlopCounter.hpp:101
Sacado::FlopCounterPack::FlopCounts::DIVIDE
Definition: Sacado_ScalarFlopCounter.hpp:67
cos
cos(expr.val())
Sacado::FlopCounterPack::FlopCounts::PLUS
Definition: Sacado_ScalarFlopCounter.hpp:59
Sacado::FlopCounterPack::FlopCounts::MIN
Definition: Sacado_ScalarFlopCounter.hpp:94
Sacado_SFINAE_Macros.hpp
Sacado::FlopCounterPack::ScalarFlopCounter::flopCounts_
static FlopCounts flopCounts_
Definition: Sacado_ScalarFlopCounter.hpp:268
tanh
tanh(expr.val())
Sacado::FlopCounterPack::FlopCounts::NUM_SUMMARY_OPS
Definition: Sacado_ScalarFlopCounter.hpp:98
Sacado::FlopCounterPack::FlopCounts::GREATER_THAN_EQUAL
Definition: Sacado_ScalarFlopCounter.hpp:70
Sacado::RemoveConst::type
T type
Definition: Sacado_Traits.hpp:418
Sacado::FlopCounterPack::ScalarFlopCounter::ScalarFlopCounter
ScalarFlopCounter(const S &v, SACADO_ENABLE_VALUE_CTOR_DECL)
Construct to scalar value.
Definition: Sacado_ScalarFlopCounter.hpp:249
Sacado::FlopCounterPack::FlopCounts::SINH
Definition: Sacado_ScalarFlopCounter.hpp:89
pow
pow(expr1.val(), expr2.val())
Sacado::FlopCounterPack::FlopCounts::EXP
Definition: Sacado_ScalarFlopCounter.hpp:74
a
a
Definition: Sacado_CacheFad_Ops.hpp:426
Sacado::FlopCounterPack::ScalarFlopCounter
Templated flop counter class.
Definition: Sacado_ScalarFlopCounter.hpp:200
Sacado::FlopCounterPack::FlopCounts::ACOS
Definition: Sacado_ScalarFlopCounter.hpp:84
Sacado::FlopCounterPack::ScalarFlopCounter::incrCounter
static void incrCounter(const FlopCounts::EFlopType &ft)
Increment an individual flop counter.
Definition: Sacado_ScalarFlopCounter.hpp:283
Sacado::FlopCounterPack::ScalarFlopCounter::getCounters
static FlopCounts getCounters()
Get the flop counts after a block of computations.
Definition: Sacado_ScalarFlopCounter.hpp:225
Sacado_ConfigDefs.h
Sacado::FlopCounterPack::FlopCounts::NUM_OPS
Definition: Sacado_ScalarFlopCounter.hpp:54
Sacado::FlopCounterPack::FlopCounts::flopCountsNames
static const char * flopCountsNames[NUM_OPS]
Names of individual flops.
Definition: Sacado_ScalarFlopCounter.hpp:111
Sacado::FlopCounterPack::FlopCounts::SUMMARY_MULTIPLY
Definition: Sacado_ScalarFlopCounter.hpp:104
Sacado::FlopCounterPack::FlopCounts::COS
Definition: Sacado_ScalarFlopCounter.hpp:81
Sacado::FlopCounterPack::FlopCounts::ABS
Definition: Sacado_ScalarFlopCounter.hpp:91
Sacado::FlopCounterPack::FlopCounts::MINUS_ASSIGN
Definition: Sacado_ScalarFlopCounter.hpp:63
Sacado::FlopCounterPack::FlopCounts::partialSummaryFlopCounts
unsigned int partialSummaryFlopCounts[NUM_SUMMARY_OPS]
Partial sum of summary category flop counts.
Definition: Sacado_ScalarFlopCounter.hpp:157
Sacado_ScalarFlopCounterTraits.hpp
acos
acos(expr.val())
Sacado::FlopCounterPack::FlopCounts::POW
Definition: Sacado_ScalarFlopCounter.hpp:92
Sacado::FlopCounterPack::ScalarFlopCounter::printCounters
static std::ostream & printCounters(std::ostream &out)
Print the current static flop counts to out.
Definition: Sacado_ScalarFlopCounter.hpp:231
Sacado::FlopCounterPack::FlopCounts::LESS_THAN
Definition: Sacado_ScalarFlopCounter.hpp:71
Sacado::FlopCounterPack::FlopCounts::reset
void reset()
Reset flop counters before starting a block of computations. *‍/.
Definition: Sacado_ScalarFlopCounter.cpp:99
Sacado::Fad::max
SimpleFad< ValueT > max(const SimpleFad< ValueT > &a, const SimpleFad< ValueT > &b)
Definition: Sacado_Fad_SimpleFadOps.hpp:434
atan
atan(expr.val())
sinh
sinh(expr.val())
Sacado::FlopCounterPack::FlopCounts::SUMMARY_COMPARISON
Definition: Sacado_ScalarFlopCounter.hpp:106
n
int n
Sacado::FlopCounterPack::ScalarFlopCounter::scalar_type
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from T)
Definition: Sacado_ScalarFlopCounter.hpp:207
Sacado::FlopCounterPack::FlopCounts::TAN
Definition: Sacado_ScalarFlopCounter.hpp:83
Sacado::FlopCounterPack::FlopCounts::ATAN
Definition: Sacado_ScalarFlopCounter.hpp:86
Sacado::FlopCounterPack::FlopCounts::UNARY_MINUS
Definition: Sacado_ScalarFlopCounter.hpp:64
Sacado::FlopCounterPack::FlopCounts::totalFlopCount
double totalFlopCount
Total flop count.
Definition: Sacado_ScalarFlopCounter.hpp:134
Sacado::FlopCounterPack::FlopCounts::summaryFlopCounts
double summaryFlopCounts[NUM_SUMMARY_OPS]
Summary category flop counts.
Definition: Sacado_ScalarFlopCounter.hpp:131