Files
eigen/Eigen/src/Core/SelfCwiseBinaryOp.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.7 KiB
C
Raw Normal View History

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
2010-06-24 23:21:58 +02:00
// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_SELFCWISEBINARYOP_H
#define EIGEN_SELFCWISEBINARYOP_H
// IWYU pragma: private
#include "./InternalHeaderCheck.h"
namespace Eigen {
2014-02-18 10:52:00 +01:00
template <typename Derived>
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator*=(const Scalar& other) {
2025-08-12 16:55:05 +00:00
using ConstantExpr = typename internal::plain_constant_type<Derived, Scalar>::type;
using Op = internal::mul_assign_op<Scalar>;
internal::call_assignment(derived(), ConstantExpr(rows(), cols(), other), Op());
return derived();
}
template <typename Derived>
template <bool Enable, typename>
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator*=(const RealScalar& other) {
2025-08-12 16:55:05 +00:00
realView() *= other;
2014-02-18 10:52:00 +01:00
return derived();
}
template <typename Derived>
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator/=(const Scalar& other) {
2025-08-12 16:55:05 +00:00
using ConstantExpr = typename internal::plain_constant_type<Derived, Scalar>::type;
using Op = internal::div_assign_op<Scalar>;
internal::call_assignment(derived(), ConstantExpr(rows(), cols(), other), Op());
return derived();
}
template <typename Derived>
template <bool Enable, typename>
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator/=(const RealScalar& other) {
2025-08-12 16:55:05 +00:00
realView() /= other;
2014-02-18 10:52:00 +01:00
return derived();
}
2010-01-05 12:46:07 +01:00
} // end namespace Eigen
#endif // EIGEN_SELFCWISEBINARYOP_H