mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix compilation issues with MSVC and NVCC.
Added a few typedef of complex return types in MatrixBase (Needed by MSVC)
This commit is contained in:
parent
5da60897ab
commit
c6789a279c
@ -6,7 +6,7 @@
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define EIGEN_GNUC_AT_LEAST(x,y) (__GNUC__>=x && __GNUC_MINOR__>=y) || __GNUC__>x
|
#define EIGEN_GNUC_AT_LEAST(x,y) (__GNUC__>=x && __GNUC_MINOR__>=y) || __GNUC__>x
|
||||||
#else
|
#else
|
||||||
#define EIGEN_GNUC_AT_LEAST(x,y) false
|
#define EIGEN_GNUC_AT_LEAST(x,y) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EIGEN_DONT_VECTORIZE
|
#ifndef EIGEN_DONT_VECTORIZE
|
||||||
@ -34,6 +34,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
|
|
||||||
|
@ -321,25 +321,23 @@ inline const Block<Derived> MatrixBase<Derived>::end(int size) const
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<int Size>
|
template<int Size>
|
||||||
inline Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
inline typename MatrixBase<Derived>::template SubVectorReturnType<Size>::Type
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size>
|
|
||||||
MatrixBase<Derived>::start()
|
MatrixBase<Derived>::start()
|
||||||
{
|
{
|
||||||
ei_assert(IsVectorAtCompileTime);
|
ei_assert(IsVectorAtCompileTime);
|
||||||
return Block<Derived, RowsAtCompileTime == 1 ? 1 : Size,
|
return Block<Derived, (RowsAtCompileTime == 1 ? 1 : Size),
|
||||||
ColsAtCompileTime == 1 ? 1 : Size>(derived(), 0, 0);
|
(ColsAtCompileTime == 1 ? 1 : Size)>(derived(), 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is the const version of start<int>().*/
|
/** This is the const version of start<int>().*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<int Size>
|
template<int Size>
|
||||||
inline const Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
inline const typename MatrixBase<Derived>::template SubVectorReturnType<Size>::Type
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size>
|
|
||||||
MatrixBase<Derived>::start() const
|
MatrixBase<Derived>::start() const
|
||||||
{
|
{
|
||||||
ei_assert(IsVectorAtCompileTime);
|
ei_assert(IsVectorAtCompileTime);
|
||||||
return Block<Derived, RowsAtCompileTime == 1 ? 1 : Size,
|
return Block<Derived, (RowsAtCompileTime == 1 ? 1 : Size),
|
||||||
ColsAtCompileTime == 1 ? 1 : Size>(derived(), 0, 0);
|
(ColsAtCompileTime == 1 ? 1 : Size)>(derived(), 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns a fixed-size expression of the last coefficients of *this.
|
/** \returns a fixed-size expression of the last coefficients of *this.
|
||||||
@ -355,8 +353,7 @@ MatrixBase<Derived>::start() const
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<int Size>
|
template<int Size>
|
||||||
inline Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
inline typename MatrixBase<Derived>::template SubVectorReturnType<Size>::Type
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size>
|
|
||||||
MatrixBase<Derived>::end()
|
MatrixBase<Derived>::end()
|
||||||
{
|
{
|
||||||
ei_assert(IsVectorAtCompileTime);
|
ei_assert(IsVectorAtCompileTime);
|
||||||
@ -370,8 +367,7 @@ MatrixBase<Derived>::end()
|
|||||||
/** This is the const version of end<int>.*/
|
/** This is the const version of end<int>.*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<int Size>
|
template<int Size>
|
||||||
inline const Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
inline const typename MatrixBase<Derived>::template SubVectorReturnType<Size>::Type
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size>
|
|
||||||
MatrixBase<Derived>::end() const
|
MatrixBase<Derived>::end() const
|
||||||
{
|
{
|
||||||
ei_assert(IsVectorAtCompileTime);
|
ei_assert(IsVectorAtCompileTime);
|
||||||
|
@ -172,7 +172,7 @@ MatrixBase<Derived>::create(const CustomNullaryOp& func)
|
|||||||
* \sa class CwiseNullaryOp
|
* \sa class CwiseNullaryOp
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::constant(int rows, int cols, const Scalar& value)
|
MatrixBase<Derived>::constant(int rows, int cols, const Scalar& value)
|
||||||
{
|
{
|
||||||
return create(rows, cols, ei_scalar_constant_op<Scalar>(value));
|
return create(rows, cols, ei_scalar_constant_op<Scalar>(value));
|
||||||
@ -194,7 +194,7 @@ MatrixBase<Derived>::constant(int rows, int cols, const Scalar& value)
|
|||||||
* \sa class CwiseNullaryOp
|
* \sa class CwiseNullaryOp
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::constant(int size, const Scalar& value)
|
MatrixBase<Derived>::constant(int size, const Scalar& value)
|
||||||
{
|
{
|
||||||
return create(size, ei_scalar_constant_op<Scalar>(value));
|
return create(size, ei_scalar_constant_op<Scalar>(value));
|
||||||
@ -210,7 +210,7 @@ MatrixBase<Derived>::constant(int size, const Scalar& value)
|
|||||||
* \sa class CwiseNullaryOp
|
* \sa class CwiseNullaryOp
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::constant(const Scalar& value)
|
MatrixBase<Derived>::constant(const Scalar& value)
|
||||||
{
|
{
|
||||||
return create(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_constant_op<Scalar>(value));
|
return create(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_constant_op<Scalar>(value));
|
||||||
@ -254,7 +254,7 @@ Derived& MatrixBase<Derived>::setConstant(const Scalar& value)
|
|||||||
* \sa zero(), zero(int)
|
* \sa zero(), zero(int)
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::zero(int rows, int cols)
|
MatrixBase<Derived>::zero(int rows, int cols)
|
||||||
{
|
{
|
||||||
return constant(rows, cols, Scalar(0));
|
return constant(rows, cols, Scalar(0));
|
||||||
@ -277,7 +277,7 @@ MatrixBase<Derived>::zero(int rows, int cols)
|
|||||||
* \sa zero(), zero(int,int)
|
* \sa zero(), zero(int,int)
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::zero(int size)
|
MatrixBase<Derived>::zero(int size)
|
||||||
{
|
{
|
||||||
return constant(size, Scalar(0));
|
return constant(size, Scalar(0));
|
||||||
@ -294,7 +294,7 @@ MatrixBase<Derived>::zero(int size)
|
|||||||
* \sa zero(int), zero(int,int)
|
* \sa zero(int), zero(int,int)
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::zero()
|
MatrixBase<Derived>::zero()
|
||||||
{
|
{
|
||||||
return constant(Scalar(0));
|
return constant(Scalar(0));
|
||||||
@ -349,7 +349,7 @@ Derived& MatrixBase<Derived>::setZero()
|
|||||||
* \sa ones(), ones(int), isOnes(), class Ones
|
* \sa ones(), ones(int), isOnes(), class Ones
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::ones(int rows, int cols)
|
MatrixBase<Derived>::ones(int rows, int cols)
|
||||||
{
|
{
|
||||||
return constant(rows, cols, Scalar(1));
|
return constant(rows, cols, Scalar(1));
|
||||||
@ -372,7 +372,7 @@ MatrixBase<Derived>::ones(int rows, int cols)
|
|||||||
* \sa ones(), ones(int,int), isOnes(), class Ones
|
* \sa ones(), ones(int,int), isOnes(), class Ones
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::ones(int size)
|
MatrixBase<Derived>::ones(int size)
|
||||||
{
|
{
|
||||||
return constant(size, Scalar(1));
|
return constant(size, Scalar(1));
|
||||||
@ -389,7 +389,7 @@ MatrixBase<Derived>::ones(int size)
|
|||||||
* \sa ones(int), ones(int,int), isOnes(), class Ones
|
* \sa ones(int), ones(int,int), isOnes(), class Ones
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const CwiseNullaryOp<ei_scalar_constant_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const typename MatrixBase<Derived>::ConstantReturnType
|
||||||
MatrixBase<Derived>::ones()
|
MatrixBase<Derived>::ones()
|
||||||
{
|
{
|
||||||
return constant(Scalar(1));
|
return constant(Scalar(1));
|
||||||
|
@ -165,7 +165,7 @@ MatrixBase<Derived>::cast() const
|
|||||||
|
|
||||||
/** \relates MatrixBase */
|
/** \relates MatrixBase */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
inline const CwiseUnaryOp<ei_scalar_multiple_op<typename ei_traits<Derived>::Scalar>, Derived>
|
inline const typename MatrixBase<Derived>::ScalarMultipleReturnType
|
||||||
MatrixBase<Derived>::operator*(const Scalar& scalar) const
|
MatrixBase<Derived>::operator*(const Scalar& scalar) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, Derived>
|
return CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, Derived>
|
||||||
|
@ -132,7 +132,7 @@ inline typename NumTraits<typename ei_traits<Derived>::Scalar>::Real MatrixBase<
|
|||||||
* \sa norm()
|
* \sa norm()
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
inline const CwiseUnaryOp<ei_scalar_multiple_op<typename ei_traits<Derived>::Scalar>, Derived>
|
inline const typename MatrixBase<Derived>::ScalarMultipleReturnType
|
||||||
MatrixBase<Derived>::normalized() const
|
MatrixBase<Derived>::normalized() const
|
||||||
{
|
{
|
||||||
return (*this) * (RealScalar(1)/norm());
|
return (*this) * (RealScalar(1)/norm());
|
||||||
|
@ -164,6 +164,20 @@ template<typename Derived> class MatrixBase
|
|||||||
inline bool isVector() const { return rows()==1 || cols()==1; }
|
inline bool isVector() const { return rows()==1 || cols()==1; }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
/// \name Default return types
|
||||||
|
//@{
|
||||||
|
/** Represents a constant matrix */
|
||||||
|
typedef CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> ConstantReturnType;
|
||||||
|
/** Represents a vector block of a matrix */
|
||||||
|
template<int Size> struct SubVectorReturnType
|
||||||
|
{
|
||||||
|
typedef Block<Derived, (ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size),
|
||||||
|
(ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size)> Type;
|
||||||
|
};
|
||||||
|
/** Represents a product scalar-matrix */
|
||||||
|
typedef CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, Derived> ScalarMultipleReturnType;
|
||||||
|
//@}
|
||||||
|
|
||||||
/// \name Copying and initialization
|
/// \name Copying and initialization
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
@ -244,8 +258,7 @@ template<typename Derived> class MatrixBase
|
|||||||
Derived& operator*=(const Scalar& other);
|
Derived& operator*=(const Scalar& other);
|
||||||
Derived& operator/=(const Scalar& other);
|
Derived& operator/=(const Scalar& other);
|
||||||
|
|
||||||
const CwiseUnaryOp<ei_scalar_multiple_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const ScalarMultipleReturnType operator*(const Scalar& scalar) const;
|
||||||
operator*(const Scalar& scalar) const;
|
|
||||||
const CwiseUnaryOp<ei_scalar_quotient1_op<typename ei_traits<Derived>::Scalar>, Derived>
|
const CwiseUnaryOp<ei_scalar_quotient1_op<typename ei_traits<Derived>::Scalar>, Derived>
|
||||||
operator/(const Scalar& scalar) const;
|
operator/(const Scalar& scalar) const;
|
||||||
|
|
||||||
@ -274,7 +287,7 @@ template<typename Derived> class MatrixBase
|
|||||||
Scalar dot(const MatrixBase<OtherDerived>& other) const;
|
Scalar dot(const MatrixBase<OtherDerived>& other) const;
|
||||||
RealScalar norm2() const;
|
RealScalar norm2() const;
|
||||||
RealScalar norm() const;
|
RealScalar norm() const;
|
||||||
const CwiseUnaryOp<ei_scalar_multiple_op<typename ei_traits<Derived>::Scalar>, Derived> normalized() const;
|
const ScalarMultipleReturnType normalized() const;
|
||||||
|
|
||||||
Transpose<Derived> transpose();
|
Transpose<Derived> transpose();
|
||||||
const Transpose<Derived> transpose() const;
|
const Transpose<Derived> transpose() const;
|
||||||
@ -320,18 +333,14 @@ template<typename Derived> class MatrixBase
|
|||||||
template<int CRows, int CCols> const Block<Derived, CRows, CCols> corner(CornerType type) const;
|
template<int CRows, int CCols> const Block<Derived, CRows, CCols> corner(CornerType type) const;
|
||||||
|
|
||||||
template<int Size>
|
template<int Size>
|
||||||
Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
typename SubVectorReturnType<Size>::Type start(void);
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size> start();
|
|
||||||
template<int Size>
|
template<int Size>
|
||||||
const Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
const typename SubVectorReturnType<Size>::Type start() const;
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size> start() const;
|
|
||||||
|
|
||||||
template<int Size>
|
template<int Size>
|
||||||
Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
typename SubVectorReturnType<Size>::Type end();
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size> end();
|
|
||||||
template<int Size>
|
template<int Size>
|
||||||
const Block<Derived, ei_traits<Derived>::RowsAtCompileTime == 1 ? 1 : Size,
|
const typename SubVectorReturnType<Size>::Type end() const;
|
||||||
ei_traits<Derived>::ColsAtCompileTime == 1 ? 1 : Size> end() const;
|
|
||||||
|
|
||||||
DiagonalCoeffs<Derived> diagonal();
|
DiagonalCoeffs<Derived> diagonal();
|
||||||
const DiagonalCoeffs<Derived> diagonal() const;
|
const DiagonalCoeffs<Derived> diagonal() const;
|
||||||
@ -339,11 +348,11 @@ template<typename Derived> class MatrixBase
|
|||||||
|
|
||||||
/// \name Generating special matrices
|
/// \name Generating special matrices
|
||||||
//@{
|
//@{
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived>
|
static const ConstantReturnType
|
||||||
constant(int rows, int cols, const Scalar& value);
|
constant(int rows, int cols, const Scalar& value);
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived>
|
static const ConstantReturnType
|
||||||
constant(int size, const Scalar& value);
|
constant(int size, const Scalar& value);
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived>
|
static const ConstantReturnType
|
||||||
constant(const Scalar& value);
|
constant(const Scalar& value);
|
||||||
|
|
||||||
template<typename CustomNullaryOp>
|
template<typename CustomNullaryOp>
|
||||||
@ -359,12 +368,12 @@ template<typename Derived> class MatrixBase
|
|||||||
static const CwiseNullaryOp<ei_scalar_random_op<Scalar>,Derived> random(int rows, int cols);
|
static const CwiseNullaryOp<ei_scalar_random_op<Scalar>,Derived> random(int rows, int cols);
|
||||||
static const CwiseNullaryOp<ei_scalar_random_op<Scalar>,Derived> random(int size);
|
static const CwiseNullaryOp<ei_scalar_random_op<Scalar>,Derived> random(int size);
|
||||||
static const CwiseNullaryOp<ei_scalar_random_op<Scalar>,Derived> random();
|
static const CwiseNullaryOp<ei_scalar_random_op<Scalar>,Derived> random();
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> zero(int rows, int cols);
|
static const ConstantReturnType zero(int rows, int cols);
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> zero(int size);
|
static const ConstantReturnType zero(int size);
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> zero();
|
static const ConstantReturnType zero();
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> ones(int rows, int cols);
|
static const ConstantReturnType ones(int rows, int cols);
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> ones(int size);
|
static const ConstantReturnType ones(int size);
|
||||||
static const CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> ones();
|
static const ConstantReturnType ones();
|
||||||
static const CwiseNullaryOp<ei_scalar_identity_op<Scalar>,Derived> identity();
|
static const CwiseNullaryOp<ei_scalar_identity_op<Scalar>,Derived> identity();
|
||||||
static const CwiseNullaryOp<ei_scalar_identity_op<Scalar>,Derived> identity(int rows, int cols);
|
static const CwiseNullaryOp<ei_scalar_identity_op<Scalar>,Derived> identity(int rows, int cols);
|
||||||
|
|
||||||
|
@ -167,13 +167,13 @@ template<typename T> class ei_product_eval_to_column_major
|
|||||||
template<typename T, int n=1> struct ei_product_nested_rhs
|
template<typename T, int n=1> struct ei_product_nested_rhs
|
||||||
{
|
{
|
||||||
typedef typename ei_meta_if<
|
typedef typename ei_meta_if<
|
||||||
ei_is_temporary<T>::ret && !(ei_traits<T>::Flags & RowMajorBit),
|
(ei_is_temporary<T>::ret && !(ei_traits<T>::Flags & RowMajorBit)),
|
||||||
T,
|
T,
|
||||||
typename ei_meta_if<
|
typename ei_meta_if<
|
||||||
(ei_traits<T>::Flags & EvalBeforeNestingBit)
|
((ei_traits<T>::Flags & EvalBeforeNestingBit)
|
||||||
|| (ei_traits<T>::Flags & RowMajorBit)
|
|| (ei_traits<T>::Flags & RowMajorBit)
|
||||||
|| (!(ei_traits<T>::Flags & DirectAccessBit))
|
|| (!(ei_traits<T>::Flags & DirectAccessBit))
|
||||||
|| (n+1) * NumTraits<typename ei_traits<T>::Scalar>::ReadCost < (n-1) * T::CoeffReadCost,
|
|| (n+1) * (NumTraits<typename ei_traits<T>::Scalar>::ReadCost) < (n-1) * T::CoeffReadCost),
|
||||||
typename ei_product_eval_to_column_major<T>::type,
|
typename ei_product_eval_to_column_major<T>::type,
|
||||||
const T&
|
const T&
|
||||||
>::ret
|
>::ret
|
||||||
@ -185,10 +185,10 @@ template<typename T, int n=1> struct ei_product_nested_lhs
|
|||||||
typedef typename ei_meta_if<
|
typedef typename ei_meta_if<
|
||||||
ei_is_temporary<T>::ret && !(ei_traits<T>::Flags & RowMajorBit),
|
ei_is_temporary<T>::ret && !(ei_traits<T>::Flags & RowMajorBit),
|
||||||
T,
|
T,
|
||||||
typename ei_meta_if<
|
typename ei_meta_if<(
|
||||||
(ei_traits<T>::Flags & EvalBeforeNestingBit)
|
(ei_traits<T>::Flags & EvalBeforeNestingBit)
|
||||||
|| (!(ei_traits<T>::Flags & DirectAccessBit))
|
|| (!(ei_traits<T>::Flags & DirectAccessBit))
|
||||||
|| (n+1) * NumTraits<typename ei_traits<T>::Scalar>::ReadCost < (n-1) * T::CoeffReadCost,
|
|| (n+1) * (NumTraits<typename ei_traits<T>::Scalar>::ReadCost) < (n-1) * T::CoeffReadCost),
|
||||||
typename ei_eval<T>::type,
|
typename ei_eval<T>::type,
|
||||||
const T&
|
const T&
|
||||||
>::ret
|
>::ret
|
||||||
|
@ -135,7 +135,7 @@ typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
|
|||||||
typedef typename Base::PacketScalar PacketScalar; \
|
typedef typename Base::PacketScalar PacketScalar; \
|
||||||
typedef typename Eigen::ei_nested<Derived>::type Nested; \
|
typedef typename Eigen::ei_nested<Derived>::type Nested; \
|
||||||
typedef typename Eigen::ei_eval<Derived>::type Eval; \
|
typedef typename Eigen::ei_eval<Derived>::type Eval; \
|
||||||
typedef Eigen::Flagged<Derived, TemporaryBit, 0> Temporary; \
|
typedef Eigen::Flagged<Derived, Eigen::TemporaryBit, 0> Temporary; \
|
||||||
enum { RowsAtCompileTime = Base::RowsAtCompileTime, \
|
enum { RowsAtCompileTime = Base::RowsAtCompileTime, \
|
||||||
ColsAtCompileTime = Base::ColsAtCompileTime, \
|
ColsAtCompileTime = Base::ColsAtCompileTime, \
|
||||||
MaxRowsAtCompileTime = Base::MaxRowsAtCompileTime, \
|
MaxRowsAtCompileTime = Base::MaxRowsAtCompileTime, \
|
||||||
|
@ -194,7 +194,7 @@ template<typename T> struct ei_unconst<const T> { typedef T type; };
|
|||||||
|
|
||||||
template<typename T> struct ei_is_temporary
|
template<typename T> struct ei_is_temporary
|
||||||
{
|
{
|
||||||
enum { ret = ei_traits<T>::Flags & TemporaryBit };
|
enum { ret = int(ei_traits<T>::Flags) & TemporaryBit };
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, int n=1> struct ei_nested
|
template<typename T, int n=1> struct ei_nested
|
||||||
|
Loading…
x
Reference in New Issue
Block a user