mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 12:46:00 +08:00
Eliminate bool bitwise warnings.
(cherry picked from commit b8e93bf589fa66da404c66c48dc512b3e7484713)
This commit is contained in:
parent
33a602eb37
commit
669dc8fadf
@ -246,7 +246,7 @@ struct tuple_coeff {
|
|||||||
|
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool value_known_statically(const Index i, const IndexTuple<T...>& t) {
|
EIGEN_DEVICE_FUNC static constexpr bool value_known_statically(const Index i, const IndexTuple<T...>& t) {
|
||||||
return ((i == Idx) & is_compile_time_constant<typename IndexTupleExtractor<Idx, T...>::ValType>::value) ||
|
return ((i == Idx) && is_compile_time_constant<typename IndexTupleExtractor<Idx, T...>::ValType>::value) ||
|
||||||
tuple_coeff<Idx-1, ValueT>::value_known_statically(i, t);
|
tuple_coeff<Idx-1, ValueT>::value_known_statically(i, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,7 +468,7 @@ struct index_statically_eq_impl {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -476,7 +476,7 @@ struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
(IndexList<FirstType, OtherTypes...>().get(i) == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -492,7 +492,7 @@ struct index_statically_ne_impl {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -500,7 +500,7 @@ struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
(IndexList<FirstType, OtherTypes...>().get(i) != value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -516,7 +516,7 @@ struct index_statically_gt_impl {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -524,7 +524,7 @@ struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
(IndexList<FirstType, OtherTypes...>().get(i) > value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -541,7 +541,7 @@ struct index_statically_lt_impl {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -549,7 +549,7 @@ struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...> > {
|
struct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
(IndexList<FirstType, OtherTypes...>().get(i) < value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -566,7 +566,7 @@ struct index_pair_first_statically_eq_impl {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_pair_first_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {
|
struct index_pair_first_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);
|
(IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -574,7 +574,7 @@ struct index_pair_first_statically_eq_impl<IndexPairList<FirstType, OtherTypes..
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_pair_first_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {
|
struct index_pair_first_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);
|
(IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -591,7 +591,7 @@ struct index_pair_second_statically_eq_impl {
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_pair_second_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {
|
struct index_pair_second_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);
|
(IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -599,7 +599,7 @@ struct index_pair_second_statically_eq_impl<IndexPairList<FirstType, OtherTypes.
|
|||||||
template <typename FirstType, typename... OtherTypes>
|
template <typename FirstType, typename... OtherTypes>
|
||||||
struct index_pair_second_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {
|
struct index_pair_second_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {
|
||||||
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {
|
||||||
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
|
return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
|
||||||
(IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);
|
(IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user