Thyra_VecOpMacros.hpp File Reference

#include "Thyra_ConfigDefs.hpp"
#include "Teuchos_ScalarTraits.hpp"

Include dependency graph for Thyra_VecOpMacros.hpp:

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

Go to the source code of this file.

Defines

#define THYRA_UNARY_VECTOR_OP_DECL(opName, intoOpName, thyraOpName, descr)
 Boilerplate code for declaring unary vector transformation operations.
#define THYRA_UNARY_VECTOR_OP(opName, intoOpName, thyraOpName, descr)
 Boilerplate code for defining unary vector transformation operations.
#define THYRA_UNARY_VECTOR_ROP_MAG_DECL(funcName, ROpName, descr)
 Boilerplate code for declaring unary vector reduction operation sthat return a magnitude type.
#define THYRA_UNARY_VECTOR_ROP_MAG(funcName, ROpName, descr)
 Boilerplate code for defining unary vector reduction operations that return a magnitude type.
#define THYRA_UNARY_VECTOR_ROP_DECL(funcName, ROpName, descr)
 Boilerplate code for declaring unary vector reduction operations that return a scalar.
#define THYRA_UNARY_VECTOR_ROP(funcName, ROpName, descr)
 Boilerplate code for defining unary vector reduction operations that return a scalar.
#define THYRA_BINARY_VECTOR_ROP_DECL(funcName, ROpName, descr)
 Boilerplate code for declaring binary vector reduction operations that return a scalar.
#define THYRA_BINARY_VECTOR_ROP(funcName, ROpName, descr)
 Boilerplate code for defining binary vector reduction operations that return a scalar.


Define Documentation

#define THYRA_UNARY_VECTOR_OP_DECL ( opName,
intoOpName,
thyraOpName,
descr   ) 

Value:

template <class Scalar>                                               \
  Vector<Scalar> opName(const Converter<Scalar, ConstVector<Scalar> >& x);      \
  template <class Scalar>                                               \
  void intoOpName(const Converter<Scalar, ConstVector<Scalar> >& donor,         \
                  Vector<Scalar>& acceptor)
Boilerplate code for declaring unary vector transformation operations.

Definition at line 38 of file Thyra_VecOpMacros.hpp.

#define THYRA_UNARY_VECTOR_OP ( opName,
intoOpName,
thyraOpName,
descr   ) 

Value:

template <class Scalar> inline                                        \
  Thyra::Vector<Scalar> opName(const Converter<Scalar, ConstVector<Scalar> >& x) \
  {                                                                     \
    Thyra::ConstVector<Scalar> y=Thyra::toVector(x);                    \
    Thyra::Vector<Scalar> rtn = space(y).createMember();                \
    intoOpName(y, rtn);                                                 \
    return rtn;                                                         \
  }                                                                     \
  template <class Scalar> inline                                        \
  void intoOpName(const Converter<Scalar, ConstVector<Scalar> >& donorSource,   \
                  Vector<Scalar>& acceptor)                             \
  {                                                                     \
    Thyra::ConstVector<Scalar> donor=Thyra::toVector(donorSource);      \
    if (acceptor.ptr().get()==0)                                        \
      {                                                                 \
        acceptor = space(donor).createMember();                         \
      }                                                                 \
    Thyra::VectorBase<Scalar>* p = acceptor.ptr().get();                \
    const Thyra::VectorBase<Scalar>* px = donor.constPtr().get();            \
    Thyra::thyraOpName(p, *px);                                         \
  }
Boilerplate code for defining unary vector transformation operations.

Definition at line 48 of file Thyra_VecOpMacros.hpp.

#define THYRA_UNARY_VECTOR_ROP_MAG_DECL ( funcName,
ROpName,
descr   ) 

Value:

template <class Scalar>                                     \
  typename Teuchos::ScalarTraits<Scalar>::magnitudeType funcName(const Converter<Scalar, ConstVector<Scalar> >& x)
Boilerplate code for declaring unary vector reduction operation sthat return a magnitude type.

Definition at line 74 of file Thyra_VecOpMacros.hpp.

#define THYRA_UNARY_VECTOR_ROP_MAG ( funcName,
ROpName,
descr   ) 

Value:

template <class Scalar> inline                            \
  typename Teuchos::ScalarTraits<Scalar>::magnitudeType funcName(const Converter<Scalar, ConstVector<Scalar> >& x) \
  {                                                         \
    Thyra::ConstVector<Scalar> y = Thyra::toVector(x);      \
    return Thyra::ROpName(*(y.constPtr()));                      \
  }
Boilerplate code for defining unary vector reduction operations that return a magnitude type.

Definition at line 81 of file Thyra_VecOpMacros.hpp.

#define THYRA_UNARY_VECTOR_ROP_DECL ( funcName,
ROpName,
descr   ) 

Value:

template <class Scalar>                                     \
  Scalar funcName(const Converter<Scalar, ConstVector<Scalar> >& x)
Boilerplate code for declaring unary vector reduction operations that return a scalar.

Definition at line 92 of file Thyra_VecOpMacros.hpp.

#define THYRA_UNARY_VECTOR_ROP ( funcName,
ROpName,
descr   ) 

Value:

template <class Scalar> inline                            \
  Scalar funcName(const Converter<Scalar, ConstVector<Scalar> >& x) \
  {                                                         \
    Thyra::ConstVector<Scalar> y = Thyra::toVector(x);      \
    return Thyra::ROpName(*(y.constPtr()));                      \
  }
Boilerplate code for defining unary vector reduction operations that return a scalar.

Definition at line 99 of file Thyra_VecOpMacros.hpp.

#define THYRA_BINARY_VECTOR_ROP_DECL ( funcName,
ROpName,
descr   ) 

Value:

template <class Scalar>                                     \
  Scalar funcName(const Converter<Scalar,ConstVector<Scalar> >& x, const Converter<Scalar,ConstVector<Scalar> >& y)
Boilerplate code for declaring binary vector reduction operations that return a scalar.

Definition at line 110 of file Thyra_VecOpMacros.hpp.

#define THYRA_BINARY_VECTOR_ROP ( funcName,
ROpName,
descr   ) 

Value:

template <class Scalar> inline \
  Scalar funcName(const Converter<Scalar,ConstVector<Scalar> >& x, const Converter<Scalar,ConstVector<Scalar> >& y) \
  { \
    Thyra::ConstVector<Scalar> _x = Thyra::toVector(x), _y = Thyra::toVector(y); \
    return Thyra::ROpName(*(_x.constPtr()),*(_y.constPtr())); \
  }
Boilerplate code for defining binary vector reduction operations that return a scalar.

Definition at line 117 of file Thyra_VecOpMacros.hpp.


Generated on Tue Oct 20 12:48:00 2009 for Thyra Package Browser (Single Doxygen Collection) by doxygen 1.4.7