RTOpPack_RTOpTHelpers.hpp File Reference

#include "RTOpPack_RTOpT.hpp"
#include "Teuchos_StandardMemberCompositionMacros.hpp"
#include "Teuchos_ScalarTraits.hpp"
#include "Teuchos_dyn_cast.hpp"

Include dependency graph for RTOpPack_RTOpTHelpers.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  RTOpPack

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, ReductScalar >
 Simple base class for all reduction operators that return a simple scalar reduction object. More...
class  RTOpPack::ROpScalarReductionBaseRawValSetter< true, false, Scalar, ReductScalar >
class  RTOpPack::ROpScalarReductionBaseRawValSetter< true, true, Scalar, ReductScalar >
class  RTOpPack::ROpScalarReductionBaseRawValSetter< false, isScalarReductScalar, Scalar, ReductScalar >
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::RTOpBoolReduceAndTransform< Scalar >
 Do a transformation and reduce to a bool. Needed for the NVector adapters for the SUNDIALS interface. 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_1_1(NUM_VECS, SUB_VECS, NUM_TARG_VECS, TARG_SUB_VECS)
 Use within an apply_op(...) function implementation where num_vecs==1, 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.
#define RTOP_APPLY_OP_3_0(NUM_VECS, SUB_VECS, NUM_TARG_VECS, TARG_SUB_VECS)
 Use within an apply_op(...) function implementation where num_vecs==3, num_targ_vecs==0.


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 RTOpPack::index_type   globalOffset = (SUB_VECS)[0].globalOffset(); \
  TEST_FOR_EXCEPT(globalOffset<0); \
  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 740 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, sub_vec[0] (subDim="<<(SUB_VECS)[0].subDim()<<",globalOffset="<<(SUB_VECS)[0].globalOffset()<<")" \
    " is not compatible with sub_vec[1] (subDim="<<(SUB_VECS)[1].subDim()<<",globalOffset="<<(SUB_VECS)[1].globalOffset()<<")" \
    ); \
  const RTOpPack::index_type   subDim  = (SUB_VECS)[0].subDim(); \
  const RTOpPack::index_type   globalOffset = (SUB_VECS)[0].globalOffset(); \
  TEST_FOR_EXCEPT(globalOffset<0); \
  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 761 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(); \
  const RTOpPack::index_type   globalOffset = (TARG_SUB_VECS)[0].globalOffset(); \
  TEST_FOR_EXCEPT(globalOffset<0); \
  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 791 of file RTOpPack_RTOpTHelpers.hpp.

#define RTOP_APPLY_OP_1_1 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)!=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() != (TARG_SUB_VECS)[0].subDim() || \
    (SUB_VECS)[0].globalOffset() != (TARG_SUB_VECS)[0].globalOffset() \
    ,IncompatibleVecs \
    ,"Error, sub_vec[0] (subDim="<<(SUB_VECS)[0].subDim()<<",globalOffset="<<(SUB_VECS)[0].globalOffset()<<")" \
    " is not compatible with targ_sub_vec[0] (subDim="<<(TARG_SUB_VECS)[0].subDim()<<",globalOffset="<<(TARG_SUB_VECS)[0].globalOffset()<<")" \
    ); \
  const RTOpPack::index_type   subDim  = (SUB_VECS)[0].subDim(); \
  const RTOpPack::index_type   globalOffset = (SUB_VECS)[0].globalOffset(); \
  TEST_FOR_EXCEPT(globalOffset<0); \
  const Scalar                 *v0_val = (SUB_VECS)[0].values(); \
  const ptrdiff_t              v0_s    = (SUB_VECS)[0].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==1, num_targ_vecs==1.

Definition at line 810 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, sub_vec[0] (subDim="<<(SUB_VECS)[0].subDim()<<",globalOffset="<<(SUB_VECS)[0].globalOffset()<<")," \
    " sub_vec[1] (subDim="<<(SUB_VECS)[1].subDim()<<",globalOffset="<<(SUB_VECS)[1].globalOffset()<<")," \
    " and targ_sub_vec[0] (subDim="<<(TARG_SUB_VECS)[0].subDim()<<",globalOffset="<<(TARG_SUB_VECS)[0].globalOffset()<<")" \
    " are not compatible." \
    ); \
  const RTOpPack::index_type   subDim  = (SUB_VECS)[0].subDim(); \
  const RTOpPack::index_type   globalOffset = (SUB_VECS)[0].globalOffset(); \
  TEST_FOR_EXCEPT(globalOffset<0); \
  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 840 of file RTOpPack_RTOpTHelpers.hpp.

#define RTOP_APPLY_OP_3_0 NUM_VECS,
SUB_VECS,
NUM_TARG_VECS,
TARG_SUB_VECS   ) 
 

Value:

TEST_FOR_EXCEPTION(                                                   \
                     (NUM_VECS)!=3 || (SUB_VECS)==NULL                  \
                     ,RTOpPack::InvalidNumVecs                          \
                     ,"Error, num_vecs="<<(NUM_VECS)<<" not allowed, only num_vecs==3, 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].subDim() != (SUB_VECS)[2].subDim() \
                     ||(SUB_VECS)[0].globalOffset() != (SUB_VECS)[1].globalOffset() \
                     ||(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();        \
  const Scalar                 *v2_val = (SUB_VECS)[2].values();        \
  const ptrdiff_t              v2_s    = (SUB_VECS)[2].stride();
Use within an apply_op(...) function implementation where num_vecs==3, num_targ_vecs==0.

Definition at line 877 of file RTOpPack_RTOpTHelpers.hpp.


Generated on Thu Sep 18 12:30:43 2008 for RTOp Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1