Sacado::FlopCounterPack::FlopCounts Class Reference

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

#include <Sacado_ScalarFlopCounter.hpp>

List of all members.

Public Types

enum  { NUM_OPS = 34 }
 

Number of total operation supported up till now.

More...
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,
  COS, SIN, TAN, ACOS,
  ASIN, ATAN, ATAN2, COSH,
  SINH, TANH, ABS, POW,
  MAX, MIN
}
 

Enum for operations.

More...
enum  { NUM_SUMMARY_OPS = 6 }
 

Number of summary operation categories.

More...
enum  ESummaryFlopType {
  SUMMARY_ASSIGN, SUMMARY_PLUS_MINUS, SUMMARY_MULTIPLY, SUMMARY_DIVIDE,
  SUMMARY_COMPARISON, SUMMARY_NONLINEAR
}
 

Enum of summary operation categories.

More...

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.
static unsigned int flopGranularity = 100000000
 The number of flops to accumulate as an integer before converting to a double.

Private Member Functions

ESummaryFlopType getSummaryType (EFlopType ft)
 Get summary op enum from op enum.

Private Attributes

unsigned int partialFlopCounts [NUM_OPS]
 Partial sum of individual flop counts.
unsigned int partialSummaryFlopCounts [NUM_SUMMARY_OPS]
 Partial sum of summary category flop counts.

Detailed Description

Class storing flop counts and summary flop counts.

Definition at line 45 of file Sacado_ScalarFlopCounter.hpp.


Member Enumeration Documentation

anonymous enum

Number of total operation supported up till now.

Enumerator:
NUM_OPS 

Definition at line 49 of file Sacado_ScalarFlopCounter.hpp.

Enum for operations.

Enumerator:
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 
COS 
SIN 
TAN 
ACOS 
ASIN 
ATAN 
ATAN2 
COSH 
SINH 
TANH 
ABS 
POW 
MAX 
MIN 

Definition at line 52 of file Sacado_ScalarFlopCounter.hpp.

anonymous enum

Number of summary operation categories.

Enumerator:
NUM_SUMMARY_OPS 

Definition at line 90 of file Sacado_ScalarFlopCounter.hpp.

Enum of summary operation categories.

Enumerator:
SUMMARY_ASSIGN 
SUMMARY_PLUS_MINUS 
SUMMARY_MULTIPLY 
SUMMARY_DIVIDE 
SUMMARY_COMPARISON 
SUMMARY_NONLINEAR 

Definition at line 93 of file Sacado_ScalarFlopCounter.hpp.


Constructor & Destructor Documentation

Sacado::FlopCounterPack::FlopCounts::FlopCounts (  ) 

Default constructor.

Definition at line 91 of file Sacado_ScalarFlopCounter.cpp.


Member Function Documentation

void Sacado::FlopCounterPack::FlopCounts::reset (  ) 

Reset flop counters before starting a block of computations. */.

Definition at line 97 of file Sacado_ScalarFlopCounter.cpp.

void Sacado::FlopCounterPack::FlopCounts::finalize (  ) 

Definition at line 108 of file Sacado_ScalarFlopCounter.cpp.

void Sacado::FlopCounterPack::FlopCounts::increment ( EFlopType  ft  ) 

Increment an individual flop counter.

Definition at line 124 of file Sacado_ScalarFlopCounter.cpp.

Sacado::FlopCounterPack::FlopCounts::ESummaryFlopType Sacado::FlopCounterPack::FlopCounts::getSummaryType ( EFlopType  ft  )  [private]

Get summary op enum from op enum.

Definition at line 141 of file Sacado_ScalarFlopCounter.cpp.


Member Data Documentation

Names of individual flops.

Definition at line 103 of file Sacado_ScalarFlopCounter.hpp.

Initial value:
{
  "="
  ,"all +-"
  ,"all *"
  ,"all /"
  ,"<,>,=="
  ,"nonlinear"
}

Names for summary operation categories.

Definition at line 106 of file Sacado_ScalarFlopCounter.hpp.

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.

Definition at line 117 of file Sacado_ScalarFlopCounter.hpp.

Individual flop counts.

Definition at line 120 of file Sacado_ScalarFlopCounter.hpp.

Summary category flop counts.

Definition at line 123 of file Sacado_ScalarFlopCounter.hpp.

Total flop count.

Definition at line 126 of file Sacado_ScalarFlopCounter.hpp.

Partial sum of individual flop counts.

Definition at line 146 of file Sacado_ScalarFlopCounter.hpp.

unsigned int Sacado::FlopCounterPack::FlopCounts::partialSummaryFlopCounts[NUM_SUMMARY_OPS] [private]

Partial sum of summary category flop counts.

Definition at line 149 of file Sacado_ScalarFlopCounter.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:19:44 2011 for Sacado Package Browser (Single Doxygen Collection) by  doxygen 1.6.3