RTOp Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RTOpPack_TOpEleWiseScale.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // RTOp: Interfaces and Support Software for Vector Reduction Transformation
4 // Operations
5 //
6 // Copyright 2006 NTESS and the RTOp contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef RTOPPACK_TOP_ELE_WISE_SCALE_HPP
12 #define RTOPPACK_TOP_ELE_WISE_SCALE_HPP
13 
14 #include "RTOpPack_RTOpTHelpers.hpp"
15 
16 
17 namespace RTOpPack {
18 
19 
21 template<class Scalar>
23 {
24 public:
25  void operator()( const Scalar &v0, Scalar &z0 ) const
26  {
27  z0 *= v0;
28  }
29 private:
30  Scalar alpha_;
31 };
32 
33 
36 template<class Scalar>
38  : public TOp_1_1_Base<Scalar, TOpEleWiseScaleEleWiseTransformation<Scalar> >
39 {
40 public:
43  {
44  this->setOpNameBase("TOpEleWiseScale");
45  }
46 };
47 
48 
49 } // namespace RTOpPack
50 
51 
52 #endif // RTOPPACK_TOP_ELE_WISE_SCALE_HPP
void operator()(const Scalar &v0, Scalar &z0) const
Base class for transformations for 1 input and 1 output vector.
Element-wise vector scaling op for TOpEleWiseScaling.
void setOpNameBase(const std::string &op_name_base)
Just set the operator name.
Element-wise vector scaling: z0[i] *= v0[i], i=0...n-1.