Utility code for creating concrete RTOpPack::RTOpT subclasses.


Classes

struct  RTOpPack::ScalarIndex< Scalar >
 Simple struct for a Scalar and an Index object. More...
class  RTOpPack::ReductTargetScalar< Scalar >
 Simple ReductTarget subclass for simple scalar objects. More...
class  RTOpPack::ReductTargetScalarIndex< Scalar >
 Simple ReductTarget subclass for Scalar,Index objects. More...
class  RTOpPack::ROpScalarReductionBase< Scalar >
 Simple base class for all reduction operators that return a simple scalar reduction object. More...
class  RTOpPack::ROpScalarIndexReductionBase< Scalar >
 Base class for all reduction operators that return a ScalarIndex reduction object. More...
class  RTOpPack::ROpIndexReductionBase< Scalar >
 Simple base class for all reduction operators that return a simple index reduction object. More...
class  RTOpPack::ROpScalarTransformationBase< Scalar >
 Simple base class for all transformation operators that use a single piece of Scalar data. More...
class  RTOpPack::ROpScalarScalarTransformationBase< Scalar >
 Simple base class for all transformation operators that use a pair of Scalar data members. More...
class  RTOpPack::TOpUnaryFuncPtr< Scalar >
 RTOpT subclass for unary transformation functions using a function pointer. More...

Defines

#define RTOP_APPLY_OP_1_0(NUM_VECS, SUB_VECS, NUM_TARG_VECS, TARG_SUB_VECS)
 Use within an apply_op(...) function implementation where num_vecs==1, num_targ_vecs==0.
#define RTOP_APPLY_OP_2_0(NUM_VECS, SUB_VECS, NUM_TARG_VECS, TARG_SUB_VECS)
 Use within an apply_op(...) function implementation where num_vecs==2, num_targ_vecs==0.
#define RTOP_APPLY_OP_0_1(NUM_VECS, SUB_VECS, NUM_TARG_VECS, TARG_SUB_VECS)
 Use within an apply_op(...) function implementation where num_vecs==0, num_targ_vecs==1.
#define RTOP_APPLY_OP_2_1(NUM_VECS, SUB_VECS, NUM_TARG_VECS, TARG_SUB_VECS)
 Use within an apply_op(...) function implementation where num_vecs==2, num_targ_vecs==1.

Detailed Description

This utility code makes it easier to define most concrete subclasses of RTOpPack::RTOpT.

Define Documentation

#define RTOP_APPLY_OP_1_0 NUM_VECS,
SUB_VECS,
NUM_TARG_VECS,
TARG_SUB_VECS   ) 
 

Value:

TEST_FOR_EXCEPTION( \
    (NUM_VECS)!=1 || (SUB_VECS)==NULL \
    ,RTOpPack::InvalidNumVecs \
    ,"Error, num_vecs="<<(NUM_VECS)<<" not allowed, only num_vecs==1, sub_vecs!=NULL" \
    ); \
  TEST_FOR_EXCEPTION( \
    (NUM_TARG_VECS)!=0 || (TARG_SUB_VECS)!=NULL \
    ,RTOpPack::InvalidNumTargVecs \
    ,"Error, num_targ_vecs="<<(NUM_TARG_VECS)<<" not allowed, only num_targ_vecs==0, targ_sub_vecs==NULL" \
    ); \
  const RTOpPack::index_type   subDim  = (SUB_VECS)[0].subDim(); \
  const Scalar                 *v0_val = (SUB_VECS)[0].values(); \
  const ptrdiff_t              v0_s    = (SUB_VECS)[0].stride()
Use within an apply_op(...) function implementation where num_vecs==1, num_targ_vecs==0.

Definition at line 577 of file RTOpPack_RTOpTHelpers.hpp.

#define RTOP_APPLY_OP_2_0 NUM_VECS,
SUB_VECS,
NUM_TARG_VECS,
TARG_SUB_VECS   ) 
 

Value:

TEST_FOR_EXCEPTION( \
    (NUM_VECS)!=2 || (SUB_VECS)==NULL \
    ,RTOpPack::InvalidNumVecs \
    ,"Error, num_vecs="<<(NUM_VECS)<<" not allowed, only num_vecs==1, sub_vecs!=NULL" \
    ); \
  TEST_FOR_EXCEPTION( \
    (NUM_TARG_VECS)!=0 || (TARG_SUB_VECS)!=NULL \
    ,RTOpPack::InvalidNumTargVecs \
    ,"Error, num_targ_vecs="<<(NUM_TARG_VECS)<<" not allowed, only num_targ_vecs==0, targ_sub_vecs==NULL" \
    ); \
  TEST_FOR_EXCEPTION( \
    (SUB_VECS)[0].subDim() != (SUB_VECS)[1].subDim() || \
    (SUB_VECS)[0].globalOffset() != (SUB_VECS)[1].globalOffset() \
    ,IncompatibleVecs \
    ,"Error, num_targ_vecs="<<(NUM_TARG_VECS)<<" not allowed, only num_targ_vecs==0, targ_sub_vecs==NULL" \
    ); \
  const RTOpPack::index_type   subDim  = (SUB_VECS)[0].subDim(); \
  const Scalar                 *v0_val = (SUB_VECS)[0].values(); \
  const ptrdiff_t              v0_s    = (SUB_VECS)[0].stride(); \
  const Scalar                 *v1_val = (SUB_VECS)[1].values(); \
  const ptrdiff_t              v1_s    = (SUB_VECS)[1].stride()
Use within an apply_op(...) function implementation where num_vecs==2, num_targ_vecs==0.

Definition at line 596 of file RTOpPack_RTOpTHelpers.hpp.

#define RTOP_APPLY_OP_0_1 NUM_VECS,
SUB_VECS,
NUM_TARG_VECS,
TARG_SUB_VECS   ) 
 

Value:

TEST_FOR_EXCEPTION( \
    (NUM_VECS)!=0 || (SUB_VECS)!=NULL \
    ,RTOpPack::InvalidNumVecs \
    ,"Error, num_vecs="<<(NUM_VECS)<<" not allowed, only num_vecs==0, sub_vecs==NULL" \
    ); \
  TEST_FOR_EXCEPTION( \
    (NUM_TARG_VECS)!=1 || (TARG_SUB_VECS)==NULL \
    ,RTOpPack::InvalidNumTargVecs \
    ,"Error, num_targ_vecs="<<(NUM_TARG_VECS)<<" not allowed, only num_targ_vecs==1, targ_sub_vecs!=NULL" \
    ); \
  const RTOpPack::index_type   subDim  = (TARG_SUB_VECS)[0].subDim(); \
  Scalar                       *z0_val = (TARG_SUB_VECS)[0].values(); \
  const ptrdiff_t              z0_s    = (TARG_SUB_VECS)[0].stride()
Use within an apply_op(...) function implementation where num_vecs==0, num_targ_vecs==1.

Definition at line 623 of file RTOpPack_RTOpTHelpers.hpp.

#define RTOP_APPLY_OP_2_1 NUM_VECS,
SUB_VECS,
NUM_TARG_VECS,
TARG_SUB_VECS   ) 
 

Value:

TEST_FOR_EXCEPTION( \
    (NUM_VECS)!=2 || (SUB_VECS)==NULL \
    ,RTOpPack::InvalidNumVecs \
    ,"Error, num_vecs="<<(NUM_VECS)<<" not allowed, only num_vecs==2, sub_vecs!=NULL" \
    ); \
  TEST_FOR_EXCEPTION( \
    (NUM_TARG_VECS)!=1 || (TARG_SUB_VECS)==NULL \
    ,RTOpPack::InvalidNumTargVecs \
    ,"Error, num_targ_vecs="<<(NUM_TARG_VECS)<<" not allowed, only num_targ_vecs==1, targ_sub_vecs!=NULL" \
    ); \
  TEST_FOR_EXCEPTION( \
    (SUB_VECS)[0].subDim() != (SUB_VECS)[1].subDim() || \
    (SUB_VECS)[0].subDim() != (TARG_SUB_VECS)[0].subDim() || \
    (SUB_VECS)[0].globalOffset() != (SUB_VECS)[1].globalOffset() || \
    (SUB_VECS)[0].globalOffset() != (TARG_SUB_VECS)[0].globalOffset() \
    ,IncompatibleVecs \
    ,"Error, num_targ_vecs="<<(NUM_TARG_VECS)<<" not allowed, only num_targ_vecs==0, targ_sub_vecs==NULL" \
    ); \
  const RTOpPack::index_type   subDim  = (SUB_VECS)[0].subDim(); \
  const Scalar                 *v0_val = (SUB_VECS)[0].values(); \
  const ptrdiff_t              v0_s    = (SUB_VECS)[0].stride(); \
  const Scalar                 *v1_val = (SUB_VECS)[1].values(); \
  const ptrdiff_t              v1_s    = (SUB_VECS)[1].stride(); \
  Scalar                       *z0_val = (TARG_SUB_VECS)[0].values(); \
  const ptrdiff_t              z0_s    = (TARG_SUB_VECS)[0].stride()
Use within an apply_op(...) function implementation where num_vecs==2, num_targ_vecs==1.

Definition at line 667 of file RTOpPack_RTOpTHelpers.hpp.


Generated on Thu Sep 18 12:39:44 2008 for RTOp : Vector Reduction/Transformation Operators by doxygen 1.3.9.1