mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
fix a couple of warnings
This commit is contained in:
parent
d2becb9612
commit
109a4f650b
@ -66,11 +66,11 @@ template<typename Derived> class MapBase
|
|||||||
inline const Scalar* data() const { return m_data; }
|
inline const Scalar* data() const { return m_data; }
|
||||||
|
|
||||||
template<bool IsForceAligned,typename Dummy> struct force_aligned_impl {
|
template<bool IsForceAligned,typename Dummy> struct force_aligned_impl {
|
||||||
AlignedDerivedType static run(MapBase& a) { return a.derived(); }
|
static AlignedDerivedType run(MapBase& a) { return a.derived(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Dummy> struct force_aligned_impl<false,Dummy> {
|
template<typename Dummy> struct force_aligned_impl<false,Dummy> {
|
||||||
AlignedDerivedType static run(MapBase& a) { return a.derived()._convertToForceAligned(); }
|
static AlignedDerivedType run(MapBase& a) { return a.derived()._convertToForceAligned(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \returns an expression equivalent to \c *this but having the \c PacketAccess constant
|
/** \returns an expression equivalent to \c *this but having the \c PacketAccess constant
|
||||||
|
@ -115,20 +115,20 @@ MatrixBase<Derived>::blueNorm() const
|
|||||||
ei_assert(false && "the algorithm cannot be guaranteed on this computer");
|
ei_assert(false && "the algorithm cannot be guaranteed on this computer");
|
||||||
}
|
}
|
||||||
iexp = -((1-iemin)/2);
|
iexp = -((1-iemin)/2);
|
||||||
b1 = std::pow(double(ibeta),iexp); // lower boundary of midrange
|
b1 = Scalar(std::pow(double(ibeta),iexp)); // lower boundary of midrange
|
||||||
iexp = (iemax + 1 - it)/2;
|
iexp = (iemax + 1 - it)/2;
|
||||||
b2 = std::pow(double(ibeta),iexp); // upper boundary of midrange
|
b2 = Scalar(std::pow(double(ibeta),iexp)); // upper boundary of midrange
|
||||||
|
|
||||||
iexp = (2-iemin)/2;
|
iexp = (2-iemin)/2;
|
||||||
s1m = std::pow(double(ibeta),iexp); // scaling factor for lower range
|
s1m = Scalar(std::pow(double(ibeta),iexp)); // scaling factor for lower range
|
||||||
iexp = - ((iemax+it)/2);
|
iexp = - ((iemax+it)/2);
|
||||||
s2m = std::pow(double(ibeta),iexp); // scaling factor for upper range
|
s2m = Scalar(std::pow(double(ibeta),iexp)); // scaling factor for upper range
|
||||||
|
|
||||||
overfl = rbig*s2m; // overfow boundary for abig
|
overfl = rbig*s2m; // overfow boundary for abig
|
||||||
eps = std::pow(double(ibeta), 1-it);
|
eps = Scalar(std::pow(double(ibeta), 1-it));
|
||||||
relerr = ei_sqrt(eps); // tolerance for neglecting asml
|
relerr = ei_sqrt(eps); // tolerance for neglecting asml
|
||||||
abig = 1.0/eps - 1.0;
|
abig = 1.0/eps - 1.0;
|
||||||
if (RealScalar(nbig)>abig) nmax = abig; // largest safe n
|
if (RealScalar(nbig)>abig) nmax = int(abig); // largest safe n
|
||||||
else nmax = nbig;
|
else nmax = nbig;
|
||||||
}
|
}
|
||||||
int n = size();
|
int n = size();
|
||||||
|
@ -234,14 +234,14 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|||||||
inline TriangularView<NestByValue<typename MatrixType::AdjointReturnType>,TransposeMode> adjoint()
|
inline TriangularView<NestByValue<typename MatrixType::AdjointReturnType>,TransposeMode> adjoint()
|
||||||
{ return m_matrix.adjoint().nestByValue(); }
|
{ return m_matrix.adjoint().nestByValue(); }
|
||||||
/** \sa MatrixBase::adjoint() const */
|
/** \sa MatrixBase::adjoint() const */
|
||||||
const inline TriangularView<NestByValue<typename MatrixType::AdjointReturnType>,TransposeMode> adjoint() const
|
inline const TriangularView<NestByValue<typename MatrixType::AdjointReturnType>,TransposeMode> adjoint() const
|
||||||
{ return m_matrix.adjoint().nestByValue(); }
|
{ return m_matrix.adjoint().nestByValue(); }
|
||||||
|
|
||||||
/** \sa MatrixBase::transpose() */
|
/** \sa MatrixBase::transpose() */
|
||||||
inline TriangularView<NestByValue<Transpose<MatrixType> >,TransposeMode> transpose()
|
inline TriangularView<NestByValue<Transpose<MatrixType> >,TransposeMode> transpose()
|
||||||
{ return m_matrix.transpose().nestByValue(); }
|
{ return m_matrix.transpose().nestByValue(); }
|
||||||
/** \sa MatrixBase::transpose() const */
|
/** \sa MatrixBase::transpose() const */
|
||||||
const inline TriangularView<NestByValue<Transpose<MatrixType> >,TransposeMode> transpose() const
|
inline const TriangularView<NestByValue<Transpose<MatrixType> >,TransposeMode> transpose() const
|
||||||
{ return m_matrix.transpose().nestByValue(); }
|
{ return m_matrix.transpose().nestByValue(); }
|
||||||
|
|
||||||
PlainMatrixType toDense() const
|
PlainMatrixType toDense() const
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#define VERIFY_TRSM(TRI,XB) { \
|
#define VERIFY_TRSM(TRI,XB) { \
|
||||||
XB.setRandom(); ref = XB; \
|
(XB).setRandom(); ref = (XB); \
|
||||||
TRI.template solveInPlace(XB); \
|
(TRI).solveInPlace(XB); \
|
||||||
VERIFY_IS_APPROX(TRI.toDense() * XB, ref); \
|
VERIFY_IS_APPROX((TRI).toDense() * (XB), ref); \
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Scalar> void trsm(int size,int cols)
|
template<typename Scalar> void trsm(int size,int cols)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user