* 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.
This commit is contained in:
Gael Guennebaud
2008-05-12 18:09:30 +00:00
parent 678f18fce4
commit 4317fad869
16 changed files with 93 additions and 78 deletions

View File

@@ -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,