Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Private Attributes | Static Private Attributes | 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]

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. More...
 
typedef ScalarType< value_type >
::type 
scalar_type
 Typename of scalar's (which may be different from T) More...
 
- Public Types inherited from Sacado::Base< ScalarFlopCounter< T > >
typedef ScalarFlopCounter< Tderived_type
 

Private Attributes

T 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. More...
 
static void finalizeCounters ()
 Finalize total flop count after block of computations. More...
 
static FlopCounts getCounters ()
 Get the flop counts after a block of computations. More...
 
static std::ostream & printCounters (std::ostream &out)
 Print the current static flop counts to out. More...
 

Object functions

 ScalarFlopCounter ()
 Construct to uninitialized. More...
 
template<typename S >
 ScalarFlopCounter (const S &v, SACADO_ENABLE_VALUE_CTOR_DECL)
 Construct to scalar value. More...
 
const Tval () const
 Return the current value. More...
 
void val (const T &a)
 Set the current value. More...
 
 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. More...
 

Additional Inherited Members

- Public Member Functions inherited from Sacado::Base< ScalarFlopCounter< T > >
const derived_typederived () const
 

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 194 of file Sacado_ScalarFlopCounter.hpp.

Member Typedef Documentation

Typename of values.

Definition at line 198 of file Sacado_ScalarFlopCounter.hpp.

Typename of scalar's (which may be different from T)

Definition at line 201 of file Sacado_ScalarFlopCounter.hpp.

Constructor & Destructor Documentation

Construct to uninitialized.

Definition at line 239 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
template<typename S >
Sacado::FlopCounterPack::ScalarFlopCounter< T >::ScalarFlopCounter ( const S &  v,
SACADO_ENABLE_VALUE_CTOR_DECL   
)
inline

Construct to scalar value.

Definition at line 243 of file Sacado_ScalarFlopCounter.hpp.

Member Function Documentation

template<class T>
static void Sacado::FlopCounterPack::ScalarFlopCounter< T >::resetCounters ( )
inlinestatic

Reset static flop counters before starting a block of computations.

Definition at line 213 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
static void Sacado::FlopCounterPack::ScalarFlopCounter< T >::finalizeCounters ( )
inlinestatic

Finalize total flop count after block of computations.

Definition at line 216 of file Sacado_ScalarFlopCounter.hpp.

template<class T>
static FlopCounts Sacado::FlopCounterPack::ScalarFlopCounter< T >::getCounters ( )
inlinestatic

Get the flop counts after a block of computations.

Definition at line 219 of file Sacado_ScalarFlopCounter.hpp.

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

Definition at line 225 of file Sacado_ScalarFlopCounter.hpp.

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

Return the current value.

Definition at line 246 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 249 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)
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.

Definition at line 277 of file Sacado_ScalarFlopCounter.hpp.

Member Data Documentation

template<class T>
FlopCounts Sacado::FlopCounterPack::ScalarFlopCounter< T >::flopCounts_
staticprivate

Definition at line 262 of file Sacado_ScalarFlopCounter.hpp.

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

Definition at line 265 of file Sacado_ScalarFlopCounter.hpp.


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