Sacado Package Browser (Single Doxygen Collection) Version of the Day
Classes | Private Attributes | Static Private Attributes
Sacado::FlopCounterPack::ScalarFlopCounter< T > Class Template Reference

Templated flop counter class. More...

#include <Sacado_ScalarFlopCounter.hpp>

List of all members.

Classes

struct  apply
 Turn ScalarFlopCounter into a meta-function class usable with mpl::apply. More...

Private Attributes

val_

Static Private Attributes

static FlopCounts flopCounts_

Static functions for general clients (apply to all object with type <tt>T</tt>

static void resetCounters ()
 Reset static flop counters before starting a block of computations.
static void finalizeCounters ()
 Finalize total flop count after block of computations.
static FlopCounts getCounters ()
 Get the flop counts after a block of computations.
static std::ostream & printCounters (std::ostream &out)
 Print the current static flop counts to out.

Object functions

 ScalarFlopCounter ()
 Construct to uninitialized.
 ScalarFlopCounter (const T &v)
 Construct to scalar value.
const T & val () const
 Return the current value.
void val (const T &a)
 Set the current value.
 SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN (=, FlopCounts::ASSIGN)
 SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN (+=, FlopCounts::PLUS_ASSIGN)
 SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN (-=, FlopCounts::MINUS_ASSIGN)
 SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN (/=, FlopCounts::DIVIDE_ASSIGN)
static void incrCounter (const FlopCounts::EFlopType &ft)
 Increment an individual flop counter.

Detailed Description

template<class T>
class Sacado::FlopCounterPack::ScalarFlopCounter< T >

Templated flop counter class.

The purpose of this simple abstract data type is to count flops within a computation.

Definition at line 192 of file Sacado_ScalarFlopCounter.hpp.


Constructor & Destructor Documentation

template<class T>
Sacado::FlopCounterPack::ScalarFlopCounter< T >::ScalarFlopCounter ( ) [inline]

Construct to uninitialized.

Definition at line 231 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
Sacado::FlopCounterPack::ScalarFlopCounter< T >::ScalarFlopCounter ( const T &  v) [inline]

Construct to scalar value.

Definition at line 234 of file Sacado_ScalarFlopCounter.hpp.


Member Function Documentation

template<class T>
static void Sacado::FlopCounterPack::ScalarFlopCounter< T >::resetCounters ( ) [inline, static]

Reset static flop counters before starting a block of computations.

Definition at line 205 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
static void Sacado::FlopCounterPack::ScalarFlopCounter< T >::finalizeCounters ( ) [inline, static]

Finalize total flop count after block of computations.

Definition at line 208 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
static FlopCounts Sacado::FlopCounterPack::ScalarFlopCounter< T >::getCounters ( ) [inline, static]

Get the flop counts after a block of computations.

Definition at line 211 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
static std::ostream& Sacado::FlopCounterPack::ScalarFlopCounter< T >::printCounters ( std::ostream &  out) [inline, static]

Print the current static flop counts to out.

This function just calls printCountersTable().

Definition at line 217 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
const T& Sacado::FlopCounterPack::ScalarFlopCounter< T >::val ( ) const [inline]

Return the current value.

Definition at line 237 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
void Sacado::FlopCounterPack::ScalarFlopCounter< T >::val ( const T &  a) [inline]

Set the current value.

Definition at line 240 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( FlopCounts::ASSIGN  )
template<class T>
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( ,
FlopCounts::PLUS_ASSIGN   
)
template<class T>
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( ,
FlopCounts::MINUS_ASSIGN   
)
template<class T>
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( ,
FlopCounts::DIVIDE_ASSIGN   
)
template<class T>
static void Sacado::FlopCounterPack::ScalarFlopCounter< T >::incrCounter ( const FlopCounts::EFlopType ft) [inline, static]

Increment an individual flop counter.

Static public functions for non-member functions (not for general clients) Note, this function is ment to be used by nonmember operator functions and not by general clients.

Definition at line 268 of file Sacado_ScalarFlopCounter.hpp.


Member Data Documentation

template<class T>
FlopCounts Sacado::FlopCounterPack::ScalarFlopCounter< T >::flopCounts_ [static, private]

Definition at line 253 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
T Sacado::FlopCounterPack::ScalarFlopCounter< T >::val_ [private]

Definition at line 256 of file Sacado_ScalarFlopCounter.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines