mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
Fixed compilation warning generated by clang
This commit is contained in:
parent
584832cb3c
commit
257b640463
@ -165,6 +165,18 @@ class TensorConversionOp : public TensorBase<TensorConversionOp<TargetType, XprT
|
|||||||
typename XprType::Nested m_xpr;
|
typename XprType::Nested m_xpr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <bool SameType, typename Eval, typename Scalar> struct ConversionSubExprEval {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static bool run(Eval& impl, Scalar*) {
|
||||||
|
impl.evalSubExprsIfNeeded(NULL);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Eval, typename Scalar> struct ConversionSubExprEval<true, Eval, Scalar> {
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static bool run(Eval& impl, Scalar* data) {
|
||||||
|
return impl.evalSubExprsIfNeeded(data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -197,11 +209,7 @@ struct TensorEvaluator<const TensorConversionOp<TargetType, ArgType>, Device>
|
|||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* data)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* data)
|
||||||
{
|
{
|
||||||
if (internal::is_same<TargetType, SrcType>::value) {
|
return ConversionSubExprEval<internal::is_same<TargetType, SrcType>::value, TensorEvaluator<ArgType, Device>, Scalar>::run(m_impl, data);
|
||||||
return m_impl.evalSubExprsIfNeeded((SrcType*)data);
|
|
||||||
}
|
|
||||||
m_impl.evalSubExprsIfNeeded(NULL);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user