Sacado  Development
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Types | List of all members
Sacado::FlopCounterPack::ScalarFlopCounter< T > Class Template Reference

Templated flop counter class. More...

#include <Sacado_ScalarFlopCounter.hpp>

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

Classes

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

Public Types

typedef RemoveConst< T >::type value_type
 Typename of values.
 
typedef ScalarType< value_type >
::type 
scalar_type
 Typename of scalar's (which may be different from T)
 
- Public Types inherited from Sacado::Base< ScalarFlopCounter< T > >
typedef ScalarFlopCounter< T > derived_type
 

Public Member Functions

Object functions
 ScalarFlopCounter ()
 Construct to uninitialized.
 
template<typename S >
 ScalarFlopCounter (const S &v, typename Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, void * >::type=0)
 Construct to scalar value.
 
const T & val () const
 Return the current value.
 
void val (const T &a)
 Set the current value.
 
ScalarFlopCounter< T > operator= (const ScalarFlopCounter< T > &s)
 
ScalarFlopCounter< T > operator+= (const ScalarFlopCounter< T > &s)
 
ScalarFlopCounter< T > operator-= (const ScalarFlopCounter< T > &s)
 
ScalarFlopCounter< T > operator*= (const ScalarFlopCounter< T > &s)
 
ScalarFlopCounter< T > operator/= (const ScalarFlopCounter< T > &s)
 
- Public Member Functions inherited from Sacado::Base< ScalarFlopCounter< T > >
const derived_type & derived () const
 

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. More...
 
static void incrCounter (const FlopCounts::EFlopType &ft)
 Increment an individual flop counter. More...
 

Detailed Description

template<typename 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<typename T>
static void Sacado::FlopCounterPack::ScalarFlopCounter< T >::incrCounter ( const FlopCounts::EFlopType ft)
inlinestatic

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.

References Sacado::FlopCounterPack::FlopCounts::increment().

template<typename T>
static std::ostream& Sacado::FlopCounterPack::ScalarFlopCounter< T >::printCounters ( std::ostream &  out)
inlinestatic

Print the current static flop counts to out.

This function just calls printCountersTable().


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