mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user