RTOp Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | 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.
 
 TOpUnaryFuncPtr (unary_func_ptr_t unary_func_ptr, const std::string &op_name)
 Calls initialize()
 
void initialize (unary_func_ptr_t unary_func_ptr, const std::string &op_name)
 Initialize.
 
void set_initialized (unary_func_ptr_t *unary_func_ptr=NULL, std::string *op_name=NULL)
 Set uninitialized.
 
- 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.
 
Teuchos::RCP< ReductTargetreduct_obj_create () const
 Creates a new reduction target object initialized and ready to be used in a reduction.
 
void reduce_reduct_objs (const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
 Reduce intermediate reduction target objects.
 
void reduct_obj_reinit (const Ptr< ReductTarget > &reduct_obj) const
 Reinitialize an already created reduction object.
 
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.
 
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.
 
std::string op_name () const
 Return the name (as a null-terminated C-style string) of the operator.
 
bool coord_invariant () const
 Returns true if this operator is coordinate invariant.
 
Range1D range () const
 Returns the continuous range of elements that this operator is defined over.
 
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.
 

Overridden from RTOpT

std::string op_name_
 
unary_func_ptr_t unary_func_ptr_
 
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
 
 TOpUnaryFuncPtr (const TOpUnaryFuncPtr &)
 
TOpUnaryFuncPtroperator= (const TOpUnaryFuncPtr &)
 

Additional Inherited Members

- Protected Member Functions inherited from RTOpPack::RTOpT< Scalar >
 RTOpT (const std::string &op_name_base="")
 Constructor that creates an operator name appended with the type.
 
void setOpNameBase (const std::string &op_name_base)
 Just set the operator name.
 
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< ReductTargetreduct_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
 

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

◆ unary_func_ptr_t

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

◆ TOpUnaryFuncPtr() [1/3]

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

Construct to uninitialized.

Definition at line 51 of file RTOpPack_TOpUnaryFuncPtr.hpp.

◆ TOpUnaryFuncPtr() [2/3]

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.

◆ TOpUnaryFuncPtr() [3/3]

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

Member Function Documentation

◆ initialize()

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.

◆ set_initialized()

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.

◆ op_name()

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

Definition at line 94 of file RTOpPack_TOpUnaryFuncPtr.hpp.

◆ apply_op()

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.

◆ operator=()

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

Member Data Documentation

◆ op_name_

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

Definition at line 119 of file RTOpPack_TOpUnaryFuncPtrDecl.hpp.

◆ unary_func_ptr_

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: