From e71f88abce4abd66ab93aaa973e4ab724b980440 Mon Sep 17 00:00:00 2001 From: Chip Kerchner Date: Wed, 8 Feb 2023 00:57:30 +0000 Subject: [PATCH] Change in Power eigen_asserts to eigen_internal_asserts since it is putting unnecessary error checking and assertions without NDEBUG. --- Eigen/src/Core/arch/AltiVec/Complex.h | 4 ++-- Eigen/src/Core/arch/AltiVec/PacketMath.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Eigen/src/Core/arch/AltiVec/Complex.h b/Eigen/src/Core/arch/AltiVec/Complex.h index 60f28ff70..e448bb657 100644 --- a/Eigen/src/Core/arch/AltiVec/Complex.h +++ b/Eigen/src/Core/arch/AltiVec/Complex.h @@ -177,7 +177,7 @@ template<> EIGEN_ALWAYS_INLINE Packet2cf pload_ignore(const std::comp template EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet pgather_complex_size2(const Scalar* from, Index stride, const Index n = 2) { - eigen_assert(n <= unpacket_traits::size && "number of elements will gather past end of packet"); + eigen_internal_assert(n <= unpacket_traits::size && "number of elements will gather past end of packet"); EIGEN_ALIGN16 Scalar af[2]; for (Index i = 0; i < n; i++) { af[i] = from[i*stride]; @@ -194,7 +194,7 @@ template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet2cf pgather_partial EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pscatter_complex_size2(Scalar* to, const Packet& from, Index stride, const Index n = 2) { - eigen_assert(n <= unpacket_traits::size && "number of elements will scatter past end of packet"); + eigen_internal_assert(n <= unpacket_traits::size && "number of elements will scatter past end of packet"); EIGEN_ALIGN16 Scalar af[2]; pstore((Scalar *) af, from); for (Index i = 0; i < n; i++) { diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h index fa12892fe..c14d268c2 100644 --- a/Eigen/src/Core/arch/AltiVec/PacketMath.h +++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h @@ -522,7 +522,7 @@ EIGEN_ALWAYS_INLINE Packet pload_partial_common(const __UNPACK_TYPE__(Packet)* f // some versions of GCC throw "unused-but-set-parameter". // ignoring these warnings for now. const Index packet_size = unpacket_traits::size; - eigen_assert(n + offset <= packet_size && "number of elements plus offset will read past end of packet"); + eigen_internal_assert(n + offset <= packet_size && "number of elements plus offset will read past end of packet"); const Index size = sizeof(__UNPACK_TYPE__(Packet)); #ifdef _ARCH_PWR9 EIGEN_UNUSED_VARIABLE(packet_size); @@ -655,7 +655,7 @@ template EIGEN_ALWAYS_INLINE void pstore_partial_common(__UNPAC // some versions of GCC throw "unused-but-set-parameter" (float *to). // ignoring these warnings for now. const Index packet_size = unpacket_traits::size; - eigen_assert(n + offset <= packet_size && "number of elements plus offset will write past end of packet"); + eigen_internal_assert(n + offset <= packet_size && "number of elements plus offset will write past end of packet"); const Index size = sizeof(__UNPACK_TYPE__(Packet)); #ifdef _ARCH_PWR9 EIGEN_UNUSED_VARIABLE(packet_size); @@ -815,7 +815,7 @@ pbroadcast4(const int *a, template EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet pgather_common(const __UNPACK_TYPE__(Packet)* from, Index stride, const Index n = unpacket_traits::size) { EIGEN_ALIGN16 __UNPACK_TYPE__(Packet) a[unpacket_traits::size]; - eigen_assert(n <= unpacket_traits::size && "number of elements will gather past end of packet"); + eigen_internal_assert(n <= unpacket_traits::size && "number of elements will gather past end of packet"); LOAD_STORE_UNROLL_16 for (Index i = 0; i < n; i++) { a[i] = from[i*stride]; @@ -897,7 +897,7 @@ template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet16uc pgather_partial EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pscatter_common(__UNPACK_TYPE__(Packet)* to, const Packet& from, Index stride, const Index n = unpacket_traits::size) { EIGEN_ALIGN16 __UNPACK_TYPE__(Packet) a[unpacket_traits::size]; - eigen_assert(n <= unpacket_traits::size && "number of elements will scatter past end of packet"); + eigen_internal_assert(n <= unpacket_traits::size && "number of elements will scatter past end of packet"); pstore<__UNPACK_TYPE__(Packet)>(a, from); LOAD_STORE_UNROLL_16 for (Index i = 0; i < n; i++) { @@ -1243,7 +1243,7 @@ template<> EIGEN_STRONG_INLINE Packet16uc ploadu(const unsigned char template EIGEN_ALWAYS_INLINE Packet ploadu_partial_common(const __UNPACK_TYPE__(Packet)* from, const Index n) { const Index packet_size = unpacket_traits::size; - eigen_assert(n <= packet_size && "number of elements will read past end of packet"); + eigen_internal_assert(n <= packet_size && "number of elements will read past end of packet"); const Index size = sizeof(__UNPACK_TYPE__(Packet)); #ifdef _ARCH_PWR9 EIGEN_UNUSED_VARIABLE(packet_size); @@ -1431,7 +1431,7 @@ template<> EIGEN_STRONG_INLINE void pstoreu(unsigned char* t template EIGEN_ALWAYS_INLINE void pstoreu_partial_common(__UNPACK_TYPE__(Packet)* to, const Packet& from, const Index n) { const Index packet_size = unpacket_traits::size; - eigen_assert(n <= packet_size && "number of elements will write past end of packet"); + eigen_internal_assert(n <= packet_size && "number of elements will write past end of packet"); const Index size = sizeof(__UNPACK_TYPE__(Packet)); #ifdef _ARCH_PWR9 EIGEN_UNUSED_VARIABLE(packet_size);