diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-05-12 18:09:30 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-05-12 18:09:30 +0000 |
commit | 4317fad8692eabe09bcafdd88de254deb8e3ea6f (patch) | |
tree | 63a1980526cda03e564440cf355fcae5e0d6af3b /Eigen/src/Core/Dot.h | |
parent | 678f18fce4dec90ffa97b2fb3a92d572fb64c059 (diff) |
* Added several cast to int of the enums (needed for some compilers)
* Fix a mistake in CwiseNullary.
* Added a CoreDeclarions header that declares only the forward declarations
and related basic stuffs.
Diffstat (limited to 'Eigen/src/Core/Dot.h')
-rw-r--r-- | Eigen/src/Core/Dot.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 28a93e71d..b0ec14a33 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -85,11 +85,11 @@ MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const Scalar res; const bool unroll = SizeAtCompileTime * (_Nested::CoeffReadCost + _OtherNested::CoeffReadCost + NumTraits<Scalar>::MulCost) - + (SizeAtCompileTime - 1) * NumTraits<Scalar>::AddCost + + (int(SizeAtCompileTime) - 1) * NumTraits<Scalar>::AddCost <= EIGEN_UNROLLING_LIMIT; if(unroll) - ei_dot_unroller<SizeAtCompileTime-1, - unroll ? SizeAtCompileTime : Dynamic, + ei_dot_unroller<int(SizeAtCompileTime)-1, + unroll ? int(SizeAtCompileTime) : Dynamic, _Nested, _OtherNested> ::run(nested, otherNested, res); else @@ -135,7 +135,7 @@ template<typename Derived> inline const CwiseUnaryOp<ei_scalar_multiple_op<typename ei_traits<Derived>::Scalar>, Derived> MatrixBase<Derived>::normalized() const { - return (*this) * (Scalar(1)/norm()); + return (*this) * (RealScalar(1)/norm()); } /** \returns true if *this is approximately orthogonal to \a other, |