RTOp Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
RTOpPack::TOpUnaryFuncPtr< Scalar > Class Template Reference

RTOpT subclass for unary transformation functions using a function pointer. More...

#include <RTOpPack_TOpUnaryFuncPtrDecl.hpp>

Inheritance diagram for RTOpPack::TOpUnaryFuncPtr< Scalar >:
Inheritance graph
[legend]

Public Types

typedef void(* unary_func_ptr_t )(const Scalar x[], int x_dim, Scalar out[])
 
- Public Types inherited from RTOpPack::RTOpT< Scalar >
typedef PrimitiveTypeTraits
< Scalar, Scalar >
::primitiveType 
primitive_value_type
 

Public Member Functions

 TOpUnaryFuncPtr ()
 Construct to uninitialized. More...
 
 TOpUnaryFuncPtr (unary_func_ptr_t unary_func_ptr, const std::string &op_name)
 Calls initialize() More...
 
void initialize (unary_func_ptr_t unary_func_ptr, const std::string &op_name)
 Initialize. More...
 
void set_initialized (unary_func_ptr_t *unary_func_ptr=NULL, std::string *op_name=NULL)
 Set uninitialized. More...
 
- Public Member Functions inherited from RTOpPack::RTOpT< Scalar >
void get_reduct_type_num_entries (const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
 Get the number of entries of each basic data type in the externalized state for a reduction object for this operator. More...
 
Teuchos::RCP< ReductTargetreduct_obj_create () const
 Creates a new reduction target object initialized and ready to be used in a reduction. More...
 
void reduce_reduct_objs (const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
 Reduce intermediate reduction target objects. More...
 
void reduct_obj_reinit (const Ptr< ReductTarget > &reduct_obj) const
 Reinitialize an already created reduction object. More...
 
void extract_reduct_obj_state (const ReductTarget &reduct_obj, const ArrayView< primitive_value_type > &value_data, const ArrayView< index_type > &index_data, const ArrayView< char_type > &char_data) const
 Extract the state of an already created reduction object. More...
 
void load_reduct_obj_state (const ArrayView< const primitive_value_type > &value_data, const ArrayView< const index_type > &index_data, const ArrayView< const char_type > &char_data, const Ptr< ReductTarget > &reduct_obj) const
 Load the state of an already created reduction object given arrays of primitive objects. More...
 
std::string op_name () const
 Return the name (as a null-terminated C-style string) of the operator. More...
 
bool coord_invariant () const
 Returns true if this operator is coordinate invariant. More...
 
Range1D range () const
 Returns the continuous range of elements that this operator is defined over. More...
 
void apply_op (const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj) const
 Apply the reduction/transformation operator to a set of sub-vectors. More...
 
- Public Member Functions inherited from Teuchos::Describable
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 
virtual std::string description () const
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 

Private Member Functions

 TOpUnaryFuncPtr (const TOpUnaryFuncPtr &)
 
TOpUnaryFuncPtroperator= (const TOpUnaryFuncPtr &)
 

Private Attributes

std::string op_name_
 
unary_func_ptr_t unary_func_ptr_
 

Overridden from RTOpT

const char * op_name () const
 
void apply_op (const int num_vecs, const ConstSubVectorView< Scalar > sub_vecs[], const int num_targ_vecs, const SubVectorView< Scalar > targ_sub_vecs[], ReductTarget *reduct_obj) const
 

Additional Inherited Members

- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 
- Protected Member Functions inherited from RTOpPack::RTOpT< Scalar >
virtual void get_reduct_type_num_entries_impl (const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
 
virtual Teuchos::RCP
< ReductTarget
reduct_obj_create_impl () const
 
virtual void reduce_reduct_objs_impl (const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
 
virtual void reduct_obj_reinit_impl (const Ptr< ReductTarget > &reduct_obj) const
 
virtual void extract_reduct_obj_state_impl (const ReductTarget &reduct_obj, const ArrayView< primitive_value_type > &value_data, const ArrayView< index_type > &index_data, const ArrayView< char_type > &char_data) const
 
virtual void load_reduct_obj_state_impl (const ArrayView< const primitive_value_type > &value_data, const ArrayView< const index_type > &index_data, const ArrayView< const char_type > &char_data, const Ptr< ReductTarget > &reduct_obj) const
 
virtual std::string op_name_impl () const
 
virtual bool coord_invariant_impl () const
 
virtual Range1D range_impl () const
 
virtual void apply_op_impl (const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj) const =0
 
 RTOpT (const std::string &op_name_base="")
 Constructor that creates an operator name appended with the type. More...
 
void setOpNameBase (const std::string &op_name_base)
 Just set the operator name. More...
 

Detailed Description

template<class Scalar>
class RTOpPack::TOpUnaryFuncPtr< Scalar >

RTOpT subclass for unary transformation functions using a function pointer.

ToDo: Finish documentation!

Definition at line 58 of file RTOpPack_TOpUnaryFuncPtrDecl.hpp.

Member Typedef Documentation

template<class Scalar >
typedef void(* RTOpPack::TOpUnaryFuncPtr< Scalar >::unary_func_ptr_t)(const Scalar x[], int x_dim, Scalar out[])

Definition at line 62 of file RTOpPack_TOpUnaryFuncPtrDecl.hpp.

Constructor & Destructor Documentation

template<class Scalar >
RTOpPack::TOpUnaryFuncPtr< Scalar >::TOpUnaryFuncPtr ( )

Construct to uninitialized.

Definition at line 51 of file RTOpPack_TOpUnaryFuncPtr.hpp.

template<class Scalar >
RTOpPack::TOpUnaryFuncPtr< Scalar >::TOpUnaryFuncPtr ( unary_func_ptr_t  unary_func_ptr,
const std::string &  op_name 
)

Calls initialize()

Definition at line 58 of file RTOpPack_TOpUnaryFuncPtr.hpp.

template<class Scalar >
RTOpPack::TOpUnaryFuncPtr< Scalar >::TOpUnaryFuncPtr ( const TOpUnaryFuncPtr< Scalar > &  )
private

Member Function Documentation

template<class Scalar >
void RTOpPack::TOpUnaryFuncPtr< Scalar >::initialize ( unary_func_ptr_t  unary_func_ptr,
const std::string &  op_name 
)

Initialize.

Parameters
unary_func_ptr[in] Pointer to function that actually performs the unary operation.
op_name[in] Name of the operation (for debugging mostly by clients)

Preconditions:

  • unary_func_ptr != NULL (throw std::invalid_argument)

Definition at line 68 of file RTOpPack_TOpUnaryFuncPtr.hpp.

template<class Scalar >
void RTOpPack::TOpUnaryFuncPtr< Scalar >::set_initialized ( unary_func_ptr_t unary_func_ptr = NULL,
std::string *  op_name = NULL 
)

Set uninitialized.

Parameters
unary_func_ptr[out] If unary_func_ptr!=NULL then *unary_func_ptr is set to pointer to function that was passed in to initialize().
op_name[out] If op_name!=NULL then *op_name is set to the operation name that was passed in to initialize().

Definition at line 79 of file RTOpPack_TOpUnaryFuncPtr.hpp.

template<class Scalar >
const char * RTOpPack::TOpUnaryFuncPtr< Scalar >::op_name ( ) const

Definition at line 94 of file RTOpPack_TOpUnaryFuncPtr.hpp.

template<class Scalar >
void RTOpPack::TOpUnaryFuncPtr< Scalar >::apply_op ( const int  num_vecs,
const ConstSubVectorView< Scalar >  sub_vecs[],
const int  num_targ_vecs,
const SubVectorView< Scalar >  targ_sub_vecs[],
ReductTarget reduct_obj 
) const

Definition at line 100 of file RTOpPack_TOpUnaryFuncPtr.hpp.

template<class Scalar >
TOpUnaryFuncPtr& RTOpPack::TOpUnaryFuncPtr< Scalar >::operator= ( const TOpUnaryFuncPtr< Scalar > &  )
private

Member Data Documentation

template<class Scalar >
std::string RTOpPack::TOpUnaryFuncPtr< Scalar >::op_name_
private

Definition at line 119 of file RTOpPack_TOpUnaryFuncPtrDecl.hpp.

template<class Scalar >
unary_func_ptr_t RTOpPack::TOpUnaryFuncPtr< Scalar >::unary_func_ptr_
private

Definition at line 120 of file RTOpPack_TOpUnaryFuncPtrDecl.hpp.


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