mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-30 10:15:13 +08:00
fix autodiff enum comparison warnings
This commit is contained in:
parent
2265242aa1
commit
4de870b6eb
@ -22,13 +22,8 @@ struct auto_diff_special_op;
|
|||||||
|
|
||||||
template <typename DerivativeType, typename OtherDerivativeType, typename EnableIf = void>
|
template <typename DerivativeType, typename OtherDerivativeType, typename EnableIf = void>
|
||||||
struct maybe_coherent_pad_helper {
|
struct maybe_coherent_pad_helper {
|
||||||
static constexpr int SizeAtCompileTime = DerivativeType::SizeAtCompileTime == Dynamic ||
|
static constexpr int SizeAtCompileTime =
|
||||||
OtherDerivativeType::SizeAtCompileTime == Dynamic
|
max_size_prefer_dynamic(DerivativeType::SizeAtCompileTime, OtherDerivativeType::SizeAtCompileTime);
|
||||||
? Dynamic
|
|
||||||
: int(DerivativeType::SizeAtCompileTime) >
|
|
||||||
int(OtherDerivativeType::SizeAtCompileTime)
|
|
||||||
? DerivativeType::SizeAtCompileTime
|
|
||||||
: OtherDerivativeType::SizeAtCompileTime;
|
|
||||||
using type = CoherentPadOp<DerivativeType, SizeAtCompileTime>;
|
using type = CoherentPadOp<DerivativeType, SizeAtCompileTime>;
|
||||||
static type pad(const DerivativeType& x, const OtherDerivativeType& y) {
|
static type pad(const DerivativeType& x, const OtherDerivativeType& y) {
|
||||||
// CoherentPadOp uses variable_if_dynamic<SizeAtCompileTime>. In this case, `SizeAtCompileTime` might
|
// CoherentPadOp uses variable_if_dynamic<SizeAtCompileTime>. In this case, `SizeAtCompileTime` might
|
||||||
|
Loading…
x
Reference in New Issue
Block a user