43#ifndef RTOPPACK_ROP_MAX_INDEX_HPP
44#define RTOPPACK_ROP_MAX_INDEX_HPP
46#include "RTOpPack_RTOpTHelpers.hpp"
57 ScalarIndex<Scalar> &reduct)
const
62 (v0 == reduct.scalar && i < reduct.index)
65 reduct = ScalarIndex<Scalar>(v0, i);
77 const ScalarIndex<Scalar>& in_reduct, ScalarIndex<Scalar>& inout_reduct
81 in_reduct.scalar > inout_reduct.scalar
84 in_reduct.scalar == inout_reduct.scalar
86 in_reduct.index < inout_reduct.index
90 inout_reduct = in_reduct;
101template<
class Scalar>
106 ROpMaxIndexEleWiseReductionOp<Scalar>,
107 ROpMaxIndexReductObjReductionOp<Scalar> >
114 this->initReductObjValue(
115 ScalarIndex<Scalar>(-ScalarTraits<Scalar>::rmax(), -1));
void operator()(const index_type i, const Scalar &v0, ScalarIndex< Scalar > &reduct) const
void operator()(const ScalarIndex< Scalar > &in_reduct, ScalarIndex< Scalar > &inout_reduct) const
Returns the maximum element and its index: result.scalar = x(k) and result.index = k such that x(k) >...
ScalarIndex< Scalar > operator()(const ReductTarget &reduct_obj) const
const ConcreteReductObj & getRawVal(const ReductTarget &reduct_obj) const
Base class for coordinate-variant scalar reduction RTOps with one input vector.
void setOpNameBase(const std::string &op_name_base)
Just set the operator name.
Abstract base class for all reduction objects.
Teuchos_Ordinal index_type