RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar > Class Template Reference

Simple base class for all reduction operators that return a simple scalar reduction object. More...

#include <RTOpPack_RTOpTHelpers.hpp>

Inheritance diagram for RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >:

[legend]
List of all members.

Overridden from RTOpT

void get_reduct_type_num_entries (int *num_values, int *num_indexes, int *num_chars) const
 
Teuchos::RefCountPtr< ReductTargetreduct_obj_create () const
 
void reduce_reduct_objs (const ReductTarget &in_reduct_obj, ReductTarget *inout_reduct_obj) const
 Default implementation here is for a sum.
void reduct_obj_reinit (ReductTarget *reduct_obj) const
 
void extract_reduct_obj_state (const ReductTarget &reduct_obj, int num_values, primitive_value_type value_data[], int num_indexes, index_type index_data[], int num_chars, char_type char_data[]) const
 
void load_reduct_obj_state (int num_values, const primitive_value_type value_data[], int num_indexes, const index_type index_data[], int num_chars, const char_type char_data[], ReductTarget *reduct_obj) const
 

Public Types

typedef RTOpT< Scalar >::primitive_value_type primitive_value_type
 

Public Member Functions

 ROpScalarReductionBase (const ReductScalar &initReductObjValue=Teuchos::ScalarTraits< ReductScalar >::zero())
 
const ReductScalar & getRawVal (const ReductTarget &reduct_obj) const
 
void setRawVal (const ReductScalar &rawVal, ReductTarget *reduct_obj) const
 

Protected Member Functions

void initReductObjValue (const ReductScalar &initReductObjValue)
 
const ReductScalar & initReductObjValue () const

Private Attributes

ReductScalar initReductObjValue_

Detailed Description

template<class Scalar, class ReductScalar = Scalar>
class RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >

Simple base class for all reduction operators that return a simple scalar reduction object.

Subclasses have to minimally define apply_op(). Subclasses should also override reduce_reduct_objs() if the reduction is not a simple summation.

Definition at line 115 of file RTOpPack_RTOpTHelpers.hpp.


Member Typedef Documentation

template<class Scalar, class ReductScalar = Scalar>
typedef RTOpT<Scalar>::primitive_value_type RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::primitive_value_type
 

Reimplemented from RTOpPack::RTOpT< Scalar >.

Definition at line 117 of file RTOpPack_RTOpTHelpers.hpp.


Constructor & Destructor Documentation

template<class Scalar, class ReductScalar = Scalar>
RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::ROpScalarReductionBase const ReductScalar &  initReductObjValue = Teuchos::ScalarTraits<ReductScalar>::zero()  )  [inline]
 

Definition at line 119 of file RTOpPack_RTOpTHelpers.hpp.


Member Function Documentation

template<class Scalar, class ReductScalar = Scalar>
const ReductScalar& RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::getRawVal const ReductTarget reduct_obj  )  const [inline]
 

Definition at line 125 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::setRawVal const ReductScalar &  rawVal,
ReductTarget reduct_obj
const [inline]
 

Definition at line 131 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::get_reduct_type_num_entries int *  num_values,
int *  num_indexes,
int *  num_chars
const [inline, virtual]
 

Reimplemented from RTOpPack::RTOpT< Scalar >.

Definition at line 142 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
Teuchos::RefCountPtr<ReductTarget> RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::reduct_obj_create  )  const [inline, virtual]
 

Reimplemented from RTOpPack::RTOpT< Scalar >.

Definition at line 153 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::reduce_reduct_objs const ReductTarget in_reduct_obj,
ReductTarget inout_reduct_obj
const [inline, virtual]
 

Default implementation here is for a sum.

Reimplemented from RTOpPack::RTOpT< Scalar >.

Reimplemented in RTOpPack::ROpMax< Scalar >, RTOpPack::ROpMin< Scalar >, RTOpPack::ROpNormInf< Scalar >, and RTOpPack::SUNDIALS_VMinQuotient< Scalar >.

Definition at line 158 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::reduct_obj_reinit ReductTarget reduct_obj  )  const [inline, virtual]
 

Reimplemented from RTOpPack::RTOpT< Scalar >.

Definition at line 189 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::extract_reduct_obj_state const ReductTarget reduct_obj,
int  num_values,
primitive_value_type  value_data[],
int  num_indexes,
index_type  index_data[],
int  num_chars,
char_type  char_data[]
const [inline, virtual]
 

Reimplemented from RTOpPack::RTOpT< Scalar >.

Definition at line 194 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::load_reduct_obj_state int  num_values,
const primitive_value_type  value_data[],
int  num_indexes,
const index_type  index_data[],
int  num_chars,
const char_type  char_data[],
ReductTarget reduct_obj
const [inline, virtual]
 

Reimplemented from RTOpPack::RTOpT< Scalar >.

Definition at line 213 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
void RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::initReductObjValue const ReductScalar &  initReductObjValue  )  [inline, protected]
 

Definition at line 277 of file RTOpPack_RTOpTHelpers.hpp.

template<class Scalar, class ReductScalar = Scalar>
const ReductScalar& RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::initReductObjValue  )  const [inline, protected]
 

Definition at line 277 of file RTOpPack_RTOpTHelpers.hpp.


Member Data Documentation

template<class Scalar, class ReductScalar = Scalar>
ReductScalar RTOpPack::ROpScalarReductionBase< Scalar, ReductScalar >::initReductObjValue_ [private]
 

Definition at line 277 of file RTOpPack_RTOpTHelpers.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:30:44 2008 for RTOp Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1