Sacado::FlopCounterPack::ScalarFlopCounter< T > Class Template Reference

Templated flop counter class. More...

#include <Sacado_ScalarFlopCounter.hpp>

Collaboration diagram for Sacado::FlopCounterPack::ScalarFlopCounter< T >:
Collaboration graph
[legend]

List of all members.

Classes

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

Public Member Functions

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 Public Member Functions

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.

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.


Member Function Documentation

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.

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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 10:19:23 2011 for Sacado by  doxygen 1.6.3