Sacado  Development
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Sacado::FlopCounterPack::FlopCounts Class Reference

Class storing flop counts and summary flop counts. More...

#include <Sacado_ScalarFlopCounter.hpp>

Public Types

enum  { NUM_OPS = 35 }
 Number of total operation supported up till now.
 
enum  EFlopType {
  ASSIGN, PLUS, PLUS_ASSIGN, UNARY_PLUS,
  MINUS, MINUS_ASSIGN, UNARY_MINUS, MULTIPLY,
  MULTIPLY_ASSIGN, DIVIDE, DIVIDE_ASSIGN, GREATER_THAN,
  GREATER_THAN_EQUAL, LESS_THAN, LESS_THAN_EQUAL, EQUAL,
  EXP, LOG, LOG10, SQRT,
  CBRT, COS, SIN, TAN,
  ACOS, ASIN, ATAN, ATAN2,
  COSH, SINH, TANH, ABS,
  POW, MAX, MIN
}
 Enum for operations.
 
enum  { NUM_SUMMARY_OPS = 6 }
 Number of summary operation categories.
 
enum  ESummaryFlopType {
  SUMMARY_ASSIGN, SUMMARY_PLUS_MINUS, SUMMARY_MULTIPLY, SUMMARY_DIVIDE,
  SUMMARY_COMPARISON, SUMMARY_NONLINEAR
}
 Enum of summary operation categories.
 

Public Member Functions

 FlopCounts ()
 Default constructor.
 
void reset ()
 Reset flop counters before starting a block of computations. */.
 
void finalize ()
 
void increment (EFlopType ft)
 Increment an individual flop counter.
 

Public Attributes

double flopCounts [NUM_OPS]
 Individual flop counts.
 
double summaryFlopCounts [NUM_SUMMARY_OPS]
 Summary category flop counts.
 
double totalFlopCount
 Total flop count.
 

Static Public Attributes

static const char * flopCountsNames [NUM_OPS]
 Names of individual flops.
 
static const char * summaryFlopCountsNames [NUM_SUMMARY_OPS]
 Names for summary operation categories. More...
 
static unsigned int flopGranularity = 100000000
 The number of flops to accumulate as an integer before converting to a double. More...
 

Detailed Description

Class storing flop counts and summary flop counts.

Member Data Documentation

unsigned int Sacado::FlopCounterPack::FlopCounts::flopGranularity = 100000000
static

The number of flops to accumulate as an integer before converting to a double.

The default value is 100 000 000 and must be less than UINT_MAX-1. Increasing this value may give somewhat better precision for the flop count when counting very large numbers of flops.

const char * Sacado::FlopCounterPack::FlopCounts::summaryFlopCountsNames
static
Initial value:
=
{
"="
,"all +-"
,"all *"
,"all /"
,"<,>,=="
,"nonlinear"
}

Names for summary operation categories.


The documentation for this class was generated from the following files: