mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-11 15:41:49 +08:00
Fix a couple of remaining warnings (missing newlines, inline-noinline, meaningless type qualifiers)
This commit is contained in:
parent
87142237b5
commit
b9fe79153b
@ -85,9 +85,7 @@ inline bool DenseBase<Derived>::all() const
|
|||||||
&& SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
|
&& SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
|
||||||
};
|
};
|
||||||
if(unroll)
|
if(unroll)
|
||||||
return internal::all_unroller<Derived,
|
return internal::all_unroller<Derived, unroll ? int(SizeAtCompileTime) : Dynamic>::run(derived());
|
||||||
unroll ? int(SizeAtCompileTime) : Dynamic
|
|
||||||
>::run(derived());
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(Index j = 0; j < cols(); ++j)
|
for(Index j = 0; j < cols(); ++j)
|
||||||
@ -111,9 +109,7 @@ inline bool DenseBase<Derived>::any() const
|
|||||||
&& SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
|
&& SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
|
||||||
};
|
};
|
||||||
if(unroll)
|
if(unroll)
|
||||||
return internal::any_unroller<Derived,
|
return internal::any_unroller<Derived, unroll ? int(SizeAtCompileTime) : Dynamic>::run(derived());
|
||||||
unroll ? int(SizeAtCompileTime) : Dynamic
|
|
||||||
>::run(derived());
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(Index j = 0; j < cols(); ++j)
|
for(Index j = 0; j < cols(); ++j)
|
||||||
|
@ -71,7 +71,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
|||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
inline explicit AlignedBox(const MatrixBase<Derived>& a_p)
|
inline explicit AlignedBox(const MatrixBase<Derived>& a_p)
|
||||||
{
|
{
|
||||||
const typename internal::nested<Derived,2>::type p(a_p.derived());
|
typename internal::nested<Derived,2>::type p(a_p.derived());
|
||||||
m_min = p;
|
m_min = p;
|
||||||
m_max = p;
|
m_max = p;
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ template<typename Scalar,int AmbientDim>
|
|||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
inline Scalar AlignedBox<Scalar,AmbientDim>::squaredExteriorDistance(const MatrixBase<Derived>& a_p) const
|
inline Scalar AlignedBox<Scalar,AmbientDim>::squaredExteriorDistance(const MatrixBase<Derived>& a_p) const
|
||||||
{
|
{
|
||||||
const typename internal::nested<Derived,2*AmbientDim>::type p(a_p.derived());
|
typename internal::nested<Derived,2*AmbientDim>::type p(a_p.derived());
|
||||||
Scalar dist2(0);
|
Scalar dist2(0);
|
||||||
Scalar aux;
|
Scalar aux;
|
||||||
for (Index k=0; k<dim(); ++k)
|
for (Index k=0; k<dim(); ++k)
|
||||||
|
@ -31,8 +31,15 @@ namespace internal {
|
|||||||
template <int SegSizeAtCompileTime> struct LU_kernel_bmod
|
template <int SegSizeAtCompileTime> struct LU_kernel_bmod
|
||||||
{
|
{
|
||||||
template <typename BlockScalarVector, typename ScalarVector, typename IndexVector, typename Index>
|
template <typename BlockScalarVector, typename ScalarVector, typename IndexVector, typename Index>
|
||||||
EIGEN_DONT_INLINE static void run(const int segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros)
|
static EIGEN_DONT_INLINE void run(const int segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda,
|
||||||
{
|
const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros);
|
||||||
|
};
|
||||||
|
|
||||||
|
template <int SegSizeAtCompileTime>
|
||||||
|
template <typename BlockScalarVector, typename ScalarVector, typename IndexVector, typename Index>
|
||||||
|
EIGEN_DONT_INLINE void LU_kernel_bmod<SegSizeAtCompileTime>::run(const int segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda,
|
||||||
|
const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros)
|
||||||
|
{
|
||||||
typedef typename ScalarVector::Scalar Scalar;
|
typedef typename ScalarVector::Scalar Scalar;
|
||||||
// First, copy U[*,j] segment from dense(*) to tempv(*)
|
// First, copy U[*,j] segment from dense(*) to tempv(*)
|
||||||
// The result of triangular solve is in tempv[*];
|
// The result of triangular solve is in tempv[*];
|
||||||
@ -80,15 +87,20 @@ template <int SegSizeAtCompileTime> struct LU_kernel_bmod
|
|||||||
irow = lsub(isub++);
|
irow = lsub(isub++);
|
||||||
dense(irow) -= l(i);
|
dense(irow) -= l(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
template <> struct LU_kernel_bmod<1>
|
template <> struct LU_kernel_bmod<1>
|
||||||
{
|
{
|
||||||
template <typename BlockScalarVector, typename ScalarVector, typename IndexVector, typename Index>
|
template <typename BlockScalarVector, typename ScalarVector, typename IndexVector, typename Index>
|
||||||
EIGEN_DONT_INLINE static void run(const int /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr, const Index lda, const Index nrow,
|
static EIGEN_DONT_INLINE void run(const int /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr,
|
||||||
IndexVector& lsub, const Index lptr, const Index no_zeros)
|
const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros);
|
||||||
{
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <typename BlockScalarVector, typename ScalarVector, typename IndexVector, typename Index>
|
||||||
|
EIGEN_DONT_INLINE void LU_kernel_bmod<1>::run(const int /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr,
|
||||||
|
const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros)
|
||||||
|
{
|
||||||
typedef typename ScalarVector::Scalar Scalar;
|
typedef typename ScalarVector::Scalar Scalar;
|
||||||
Scalar f = dense(lsub(lptr + no_zeros));
|
Scalar f = dense(lsub(lptr + no_zeros));
|
||||||
luptr += lda * no_zeros + no_zeros + 1;
|
luptr += lda * no_zeros + no_zeros + 1;
|
||||||
@ -110,8 +122,7 @@ template <> struct LU_kernel_bmod<1>
|
|||||||
}
|
}
|
||||||
if(i<nrow)
|
if(i<nrow)
|
||||||
dense.coeffRef(*(irow++)) -= f * *(a++);
|
dense.coeffRef(*(irow++)) -= f * *(a++);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user