2009-11-20 15:39:38 +01:00
|
|
|
// 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>
|
2009-11-20 15:39:38 +01:00
|
|
|
//
|
2012-07-13 14:42:47 -04:00
|
|
|
// 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/.
|
2009-11-20 15:39:38 +01:00
|
|
|
|
|
|
|
|
#ifndef EIGEN_SELFCWISEBINARYOP_H
|
|
|
|
|
#define EIGEN_SELFCWISEBINARYOP_H
|
|
|
|
|
|
2023-08-21 16:25:22 +00:00
|
|
|
// IWYU pragma: private
|
2021-09-10 19:12:26 +00:00
|
|
|
#include "./InternalHeaderCheck.h"
|
|
|
|
|
|
2012-04-15 11:06:28 +01:00
|
|
|
namespace Eigen {
|
|
|
|
|
|
2014-02-18 10:52:00 +01:00
|
|
|
template <typename Derived>
|
2026-02-24 19:59:10 -08:00
|
|
|
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>
|
2026-02-24 19:59:10 -08:00
|
|
|
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>
|
2026-02-24 19:59:10 -08:00
|
|
|
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>
|
2026-02-24 19:59:10 -08:00
|
|
|
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
|
|
|
|
2012-04-15 11:06:28 +01:00
|
|
|
} // end namespace Eigen
|
|
|
|
|
|
2009-11-20 15:39:38 +01:00
|
|
|
#endif // EIGEN_SELFCWISEBINARYOP_H
|