Sacado Package Browser (Single Doxygen Collection)
Version of the Day
|
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. 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, CBRT, 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. More... | |
void | reset () |
Reset flop counters before starting a block of computations. */. More... | |
void | finalize () |
void | increment (EFlopType ft) |
Increment an individual flop counter. More... | |
Public Attributes | |
double | flopCounts [NUM_OPS] |
Individual flop counts. More... | |
double | summaryFlopCounts [NUM_SUMMARY_OPS] |
Summary category flop counts. More... | |
double | totalFlopCount |
Total flop count. More... | |
Static Public Attributes | |
static const char * | flopCountsNames [NUM_OPS] |
Names of individual flops. More... | |
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... | |
Private Member Functions | |
ESummaryFlopType | getSummaryType (EFlopType ft) |
Get summary op enum from op enum. More... | |
Private Attributes | |
unsigned int | partialFlopCounts [NUM_OPS] |
Partial sum of individual flop counts. More... | |
unsigned int | partialSummaryFlopCounts [NUM_SUMMARY_OPS] |
Partial sum of summary category flop counts. More... | |
Class storing flop counts and summary flop counts.
Definition at line 26 of file Sacado_ScalarFlopCounter.hpp.
anonymous enum |
Number of total operation supported up till now.
Enumerator | |
---|---|
NUM_OPS |
Definition at line 30 of file Sacado_ScalarFlopCounter.hpp.
Enum for operations.
Definition at line 33 of file Sacado_ScalarFlopCounter.hpp.
anonymous enum |
Number of summary operation categories.
Enumerator | |
---|---|
NUM_SUMMARY_OPS |
Definition at line 72 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 75 of file Sacado_ScalarFlopCounter.hpp.
Sacado::FlopCounterPack::FlopCounts::FlopCounts | ( | ) |
Default constructor.
Definition at line 71 of file Sacado_ScalarFlopCounter.cpp.
void Sacado::FlopCounterPack::FlopCounts::reset | ( | ) |
Reset flop counters before starting a block of computations. */.
Definition at line 77 of file Sacado_ScalarFlopCounter.cpp.
void Sacado::FlopCounterPack::FlopCounts::finalize | ( | ) |
Definition at line 88 of file Sacado_ScalarFlopCounter.cpp.
Increment an individual flop counter.
Definition at line 104 of file Sacado_ScalarFlopCounter.cpp.
|
private |
Get summary op enum from op enum.
Definition at line 121 of file Sacado_ScalarFlopCounter.cpp.
|
static |
Names of individual flops.
Definition at line 85 of file Sacado_ScalarFlopCounter.hpp.
|
static |
Names for summary operation categories.
Definition at line 88 of file Sacado_ScalarFlopCounter.hpp.
|
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 99 of file Sacado_ScalarFlopCounter.hpp.
double Sacado::FlopCounterPack::FlopCounts::flopCounts[NUM_OPS] |
Individual flop counts.
Definition at line 102 of file Sacado_ScalarFlopCounter.hpp.
double Sacado::FlopCounterPack::FlopCounts::summaryFlopCounts[NUM_SUMMARY_OPS] |
Summary category flop counts.
Definition at line 105 of file Sacado_ScalarFlopCounter.hpp.
double Sacado::FlopCounterPack::FlopCounts::totalFlopCount |
Total flop count.
Definition at line 108 of file Sacado_ScalarFlopCounter.hpp.
|
private |
Partial sum of individual flop counts.
Definition at line 128 of file Sacado_ScalarFlopCounter.hpp.
|
private |
Partial sum of summary category flop counts.
Definition at line 131 of file Sacado_ScalarFlopCounter.hpp.