void
 ele_wise_bound (const ::Thyra::VectorBase<Scalar>& x_lo,
                    const ::Thyra::VectorBase<Scalar>& x_up,
                    const Teuchos::Ptr< ::Thyra::VectorBase<Scalar> > &x) {
   using Teuchos::tuple;
   using Teuchos::ptrInArg;
   using Teuchos::null;
   RTOpPack::TOpEleWiseBound<Scalar> ele_wise_bound_op;
   ::Thyra::applyOp<Scalar> (ele_wise_bound_op,
                             tuple (ptrInArg (x_lo), ptrInArg (x_up)), tuple (x),
                             null);
 }
 void
 ele_wise_prune_upper (const ::Thyra::VectorBase<Scalar>& x,
                    const ::Thyra::VectorBase<Scalar>& x_up,
                    const Teuchos::Ptr< ::Thyra::VectorBase<Scalar> > &v,
                    const Scalar& eps) {
   using Teuchos::tuple;
   using Teuchos::ptrInArg;
   using Teuchos::null;
   RTOpPack::TOpEleWisePruneUpper_2_1<Scalar> ele_wise_prune_op(eps);
   ::Thyra::applyOp<Scalar> (ele_wise_prune_op,
                             tuple (ptrInArg (x), ptrInArg (x_up)), tuple (v),
                             null);
 }
void Thyra::reductions( const MultiVectorBase<Scalar>& V, const NormOp &op,
  const ArrayView<typename ScalarTraits<Scalar>::magnitudeType> &norms )
{
  using Teuchos::tuple; using Teuchos::ptrInArg; using Teuchos::null;
  const int m = V.domain()->dim();
  Array<RCP<RTOpPack::ReductTarget> > rcp_op_targs(m);
  Array<Ptr<RTOpPack::ReductTarget> > op_targs(m);
  for( int kc = 0; kc < m; ++kc ) {
    rcp_op_targs[kc] = op.reduct_obj_create();
    op_targs[kc] = rcp_op_targs[kc].ptr();
  }
  applyOp<Scalar>(op, tuple(ptrInArg(V)),
    ArrayView<Ptr<MultiVectorBase<Scalar> > >(null),
    op_targs );
  for( int kc = 0; kc < m; ++kc ) {
    norms[kc] = op(*op_targs[kc]);
  }
}