Line data Source code
1 : #pragma once 2 : 3 : #include "TypeTraits.hpp" 4 : #include "transforms/Add.h" 5 : 6 : namespace elsa 7 : { 8 : /// @brief Add the two ranges together, while the first is the output range at the same time 9 : /// @ingroup transforms 10 : template <class InOutIter, class InputIter> 11 : void inplaceAdd(InOutIter xfirst, InOutIter xlast, InputIter yfirst) 12 3134 : { 13 3134 : elsa::add(xfirst, xlast, yfirst, xfirst); 14 3134 : } 15 : 16 : /// @brief Add a range to a scalar, while the given range is also the output range 17 : /// @ingroup transforms 18 : template <class InOutIter, class Scalar> 19 : void inplaceAddScalar(InOutIter xfirst, InOutIter xlast, const Scalar& scalar) 20 41 : { 21 41 : elsa::addScalar(xfirst, xlast, scalar, xfirst); 22 41 : } 23 : } // namespace elsa