Sacado Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
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]

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< Tderived_type
 

Object functions

static FlopCounts flopCounts_
 
T val_
 
static void incrCounter (const FlopCounts::EFlopType &ft)
 Increment an individual flop counter.
 
 ScalarFlopCounter ()
 Construct to uninitialized.
 
template<typename S >
 ScalarFlopCounter (const S &v, SACADO_ENABLE_VALUE_CTOR_DECL)
 Construct to scalar value.
 
const Tval () 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 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.
 

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

Member Typedef Documentation

◆ value_type

template<class T >
typedef RemoveConst<T>::type Sacado::FlopCounterPack::ScalarFlopCounter< T >::value_type

Typename of values.

Definition at line 204 of file Sacado_ScalarFlopCounter.hpp.

◆ scalar_type

template<class T >
typedef ScalarType<value_type>::type Sacado::FlopCounterPack::ScalarFlopCounter< T >::scalar_type

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

Definition at line 207 of file Sacado_ScalarFlopCounter.hpp.

Constructor & Destructor Documentation

◆ ScalarFlopCounter() [1/2]

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

Construct to uninitialized.

Definition at line 245 of file Sacado_ScalarFlopCounter.hpp.

◆ ScalarFlopCounter() [2/2]

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

Member Function Documentation

◆ resetCounters()

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

Reset static flop counters before starting a block of computations.

Definition at line 219 of file Sacado_ScalarFlopCounter.hpp.

◆ finalizeCounters()

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

Finalize total flop count after block of computations.

Definition at line 222 of file Sacado_ScalarFlopCounter.hpp.

◆ getCounters()

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

Get the flop counts after a block of computations.

Definition at line 225 of file Sacado_ScalarFlopCounter.hpp.

◆ printCounters()

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

◆ val() [1/2]

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

Return the current value.

Definition at line 252 of file Sacado_ScalarFlopCounter.hpp.

◆ val() [2/2]

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

Set the current value.

Definition at line 255 of file Sacado_ScalarFlopCounter.hpp.

◆ SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN() [1/4]

template<class T >
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( FlopCounts::ASSIGN  )

◆ SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN() [2/4]

template<class T >
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( ,
FlopCounts::PLUS_ASSIGN   
)

◆ SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN() [3/4]

template<class T >
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( ,
FlopCounts::MINUS_ASSIGN   
)

◆ SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN() [4/4]

template<class T >
Sacado::FlopCounterPack::ScalarFlopCounter< T >::SCALAR_FLOP_COUNTER_BINARY_OP_ASSIGN ( ,
FlopCounts::DIVIDE_ASSIGN   
)

◆ incrCounter()

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

Member Data Documentation

◆ flopCounts_

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

Definition at line 268 of file Sacado_ScalarFlopCounter.hpp.

◆ val_

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

Definition at line 271 of file Sacado_ScalarFlopCounter.hpp.


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