Support Software for Vector Reduction/Transformation Operators  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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 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...
 

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
 

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 26 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 30 of file RTOpPack_TOpUnaryFuncPtrDecl.hpp.

Constructor & Destructor Documentation

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

Construct to uninitialized.

Definition at line 19 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 26 of file RTOpPack_TOpUnaryFuncPtr.hpp.

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 36 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 47 of file RTOpPack_TOpUnaryFuncPtr.hpp.

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

Definition at line 62 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 68 of file RTOpPack_TOpUnaryFuncPtr.hpp.


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