From b8e93bf589fa66da404c66c48dc512b3e7484713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Tue, 9 Aug 2022 22:42:30 +0000 Subject: [PATCH] Eliminate bool bitwise warnings. --- .../Eigen/CXX11/src/Tensor/TensorIndexList.h | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h index f2f7976d2..dc97d213f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h @@ -243,7 +243,7 @@ struct tuple_coeff { template EIGEN_DEVICE_FUNC static constexpr bool value_known_statically(const Index i, const IndexTuple& t) { - return ((i == Idx) & is_compile_time_constant::ValType>::value) || + return ((i == Idx) && is_compile_time_constant::ValType>::value) || tuple_coeff::value_known_statically(i, t); } @@ -470,7 +470,7 @@ struct index_statically_eq_impl { template struct index_statically_eq_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) == value); } }; @@ -478,7 +478,7 @@ struct index_statically_eq_impl > { template struct index_statically_eq_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) == value); } }; @@ -494,7 +494,7 @@ struct index_statically_ne_impl { template struct index_statically_ne_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) != value); } }; @@ -502,7 +502,7 @@ struct index_statically_ne_impl > { template struct index_statically_ne_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) != value); } }; @@ -518,7 +518,7 @@ struct index_statically_gt_impl { template struct index_statically_gt_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) > value); } }; @@ -526,7 +526,7 @@ struct index_statically_gt_impl > { template struct index_statically_gt_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) > value); } }; @@ -543,7 +543,7 @@ struct index_statically_lt_impl { template struct index_statically_lt_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) < value); } }; @@ -551,7 +551,7 @@ struct index_statically_lt_impl > { template struct index_statically_lt_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexList().value_known_statically(i) & + return IndexList().value_known_statically(i) && (IndexList().get(i) < value); } }; @@ -568,7 +568,7 @@ struct index_pair_first_statically_eq_impl { template struct index_pair_first_statically_eq_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexPairList().value_known_statically(i) & + return IndexPairList().value_known_statically(i) && (IndexPairList().operator[](i).first == value); } }; @@ -576,7 +576,7 @@ struct index_pair_first_statically_eq_impl struct index_pair_first_statically_eq_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexPairList().value_known_statically(i) & + return IndexPairList().value_known_statically(i) && (IndexPairList().operator[](i).first == value); } }; @@ -593,7 +593,7 @@ struct index_pair_second_statically_eq_impl { template struct index_pair_second_statically_eq_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexPairList().value_known_statically(i) & + return IndexPairList().value_known_statically(i) && (IndexPairList().operator[](i).second == value); } }; @@ -601,7 +601,7 @@ struct index_pair_second_statically_eq_impl struct index_pair_second_statically_eq_impl > { EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) { - return IndexPairList().value_known_statically(i) & + return IndexPairList().value_known_statically(i) && (IndexPairList().operator[](i).second == value); } };