mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
committed by
Antonio Sánchez
parent
9164d3f16a
commit
2ac496ff8a
@@ -206,7 +206,9 @@ class VectorwiseOp {
|
|||||||
public:
|
public:
|
||||||
typedef typename ExpressionType::Scalar Scalar;
|
typedef typename ExpressionType::Scalar Scalar;
|
||||||
typedef typename ExpressionType::RealScalar RealScalar;
|
typedef typename ExpressionType::RealScalar RealScalar;
|
||||||
typedef internal::remove_all_t<ExpressionType> ExpressionTypeCleaned;
|
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||||
|
typedef typename internal::ref_selector<ExpressionType>::non_const_type ExpressionTypeNested;
|
||||||
|
typedef internal::remove_all_t<ExpressionTypeNested> ExpressionTypeNestedCleaned;
|
||||||
|
|
||||||
template <template <typename OutScalar, typename InputScalar> class Functor, typename ReturnScalar = Scalar>
|
template <template <typename OutScalar, typename InputScalar> class Functor, typename ReturnScalar = Scalar>
|
||||||
struct ReturnType {
|
struct ReturnType {
|
||||||
@@ -345,7 +347,7 @@ class VectorwiseOp {
|
|||||||
|
|
||||||
typedef typename ReturnType<internal::member_minCoeff>::Type MinCoeffReturnType;
|
typedef typename ReturnType<internal::member_minCoeff>::Type MinCoeffReturnType;
|
||||||
typedef typename ReturnType<internal::member_maxCoeff>::Type MaxCoeffReturnType;
|
typedef typename ReturnType<internal::member_maxCoeff>::Type MaxCoeffReturnType;
|
||||||
typedef PartialReduxExpr<const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const ExpressionTypeCleaned>,
|
typedef PartialReduxExpr<const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const ExpressionTypeNestedCleaned>,
|
||||||
internal::member_sum<RealScalar, RealScalar>, Direction>
|
internal::member_sum<RealScalar, RealScalar>, Direction>
|
||||||
SquaredNormReturnType;
|
SquaredNormReturnType;
|
||||||
typedef CwiseUnaryOp<internal::scalar_sqrt_op<RealScalar>, const SquaredNormReturnType> NormReturnType;
|
typedef CwiseUnaryOp<internal::scalar_sqrt_op<RealScalar>, const SquaredNormReturnType> NormReturnType;
|
||||||
@@ -596,7 +598,7 @@ class VectorwiseOp {
|
|||||||
/** Returns the expression of the sum of the vector \a other to each subvector of \c *this */
|
/** Returns the expression of the sum of the vector \a other to each subvector of \c *this */
|
||||||
template <typename OtherDerived>
|
template <typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
|
||||||
CwiseBinaryOp<internal::scalar_sum_op<Scalar, typename OtherDerived::Scalar>, const ExpressionTypeCleaned,
|
CwiseBinaryOp<internal::scalar_sum_op<Scalar, typename OtherDerived::Scalar>, const ExpressionTypeNestedCleaned,
|
||||||
const typename ExtendedType<OtherDerived>::Type>
|
const typename ExtendedType<OtherDerived>::Type>
|
||||||
operator+(const DenseBase<OtherDerived>& other) const {
|
operator+(const DenseBase<OtherDerived>& other) const {
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
||||||
@@ -607,7 +609,7 @@ class VectorwiseOp {
|
|||||||
/** Returns the expression of the difference between each subvector of \c *this and the vector \a other */
|
/** Returns the expression of the difference between each subvector of \c *this and the vector \a other */
|
||||||
template <typename OtherDerived>
|
template <typename OtherDerived>
|
||||||
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_difference_op<Scalar, typename OtherDerived::Scalar>,
|
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_difference_op<Scalar, typename OtherDerived::Scalar>,
|
||||||
const ExpressionTypeCleaned, const typename ExtendedType<OtherDerived>::Type>
|
const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type>
|
||||||
operator-(const DenseBase<OtherDerived>& other) const {
|
operator-(const DenseBase<OtherDerived>& other) const {
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
||||||
EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
|
EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
|
||||||
@@ -618,7 +620,7 @@ class VectorwiseOp {
|
|||||||
* by the corresponding subvector of \c *this */
|
* by the corresponding subvector of \c *this */
|
||||||
template <typename OtherDerived>
|
template <typename OtherDerived>
|
||||||
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_product_op<Scalar, typename OtherDerived::Scalar>,
|
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_product_op<Scalar, typename OtherDerived::Scalar>,
|
||||||
const ExpressionTypeCleaned, const typename ExtendedType<OtherDerived>::Type>
|
const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type>
|
||||||
operator*(const DenseBase<OtherDerived>& other) const {
|
operator*(const DenseBase<OtherDerived>& other) const {
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
||||||
EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
|
EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
|
||||||
@@ -630,7 +632,7 @@ class VectorwiseOp {
|
|||||||
* subvector of \c *this by the vector \a other */
|
* subvector of \c *this by the vector \a other */
|
||||||
template <typename OtherDerived>
|
template <typename OtherDerived>
|
||||||
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_quotient_op<Scalar, typename OtherDerived::Scalar>,
|
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_quotient_op<Scalar, typename OtherDerived::Scalar>,
|
||||||
const ExpressionTypeCleaned, const typename ExtendedType<OtherDerived>::Type>
|
const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type>
|
||||||
operator/(const DenseBase<OtherDerived>& other) const {
|
operator/(const DenseBase<OtherDerived>& other) const {
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
|
||||||
EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
|
EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
|
||||||
@@ -640,7 +642,7 @@ class VectorwiseOp {
|
|||||||
|
|
||||||
using Normalized_NonzeroNormType =
|
using Normalized_NonzeroNormType =
|
||||||
CwiseUnaryOp<internal::scalar_replace_zero_with_one_op<Scalar>, const NormReturnType>;
|
CwiseUnaryOp<internal::scalar_replace_zero_with_one_op<Scalar>, const NormReturnType>;
|
||||||
using NormalizedReturnType = CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const ExpressionTypeCleaned,
|
using NormalizedReturnType = CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const ExpressionTypeNestedCleaned,
|
||||||
const typename OppositeExtendedType<Normalized_NonzeroNormType>::Type>;
|
const typename OppositeExtendedType<Normalized_NonzeroNormType>::Type>;
|
||||||
|
|
||||||
/** \returns an expression where each column (or row) of the referenced matrix are normalized.
|
/** \returns an expression where each column (or row) of the referenced matrix are normalized.
|
||||||
@@ -703,7 +705,7 @@ class VectorwiseOp {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
EIGEN_DEVICE_FUNC Index redux_length() const { return Direction == Vertical ? m_matrix.rows() : m_matrix.cols(); }
|
EIGEN_DEVICE_FUNC Index redux_length() const { return Direction == Vertical ? m_matrix.rows() : m_matrix.cols(); }
|
||||||
ExpressionType& m_matrix;
|
ExpressionTypeNested m_matrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
// const colwise moved to DenseBase.h due to CUDA compiler bug
|
// const colwise moved to DenseBase.h due to CUDA compiler bug
|
||||||
|
|||||||
Reference in New Issue
Block a user