mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 14:53:13 +08:00
Change in Power eigen_asserts to eigen_internal_asserts since it is putting unnecessary error checking and assertions without NDEBUG.
This commit is contained in:
parent
232b18fa8a
commit
e71f88abce
@ -177,7 +177,7 @@ template<> EIGEN_ALWAYS_INLINE Packet2cf pload_ignore<Packet2cf>(const std::comp
|
|||||||
|
|
||||||
template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet pgather_complex_size2(const Scalar* from, Index stride, const Index n = 2)
|
template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet pgather_complex_size2(const Scalar* from, Index stride, const Index n = 2)
|
||||||
{
|
{
|
||||||
eigen_assert(n <= unpacket_traits<Packet>::size && "number of elements will gather past end of packet");
|
eigen_internal_assert(n <= unpacket_traits<Packet>::size && "number of elements will gather past end of packet");
|
||||||
EIGEN_ALIGN16 Scalar af[2];
|
EIGEN_ALIGN16 Scalar af[2];
|
||||||
for (Index i = 0; i < n; i++) {
|
for (Index i = 0; i < n; i++) {
|
||||||
af[i] = from[i*stride];
|
af[i] = from[i*stride];
|
||||||
@ -194,7 +194,7 @@ template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet2cf pgather_partial<std::
|
|||||||
}
|
}
|
||||||
template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pscatter_complex_size2(Scalar* to, const Packet& from, Index stride, const Index n = 2)
|
template<typename Scalar, typename Packet> 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<Packet>::size && "number of elements will scatter past end of packet");
|
eigen_internal_assert(n <= unpacket_traits<Packet>::size && "number of elements will scatter past end of packet");
|
||||||
EIGEN_ALIGN16 Scalar af[2];
|
EIGEN_ALIGN16 Scalar af[2];
|
||||||
pstore<Scalar>((Scalar *) af, from);
|
pstore<Scalar>((Scalar *) af, from);
|
||||||
for (Index i = 0; i < n; i++) {
|
for (Index i = 0; i < n; i++) {
|
||||||
|
@ -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".
|
// some versions of GCC throw "unused-but-set-parameter".
|
||||||
// ignoring these warnings for now.
|
// ignoring these warnings for now.
|
||||||
const Index packet_size = unpacket_traits<Packet>::size;
|
const Index packet_size = unpacket_traits<Packet>::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));
|
const Index size = sizeof(__UNPACK_TYPE__(Packet));
|
||||||
#ifdef _ARCH_PWR9
|
#ifdef _ARCH_PWR9
|
||||||
EIGEN_UNUSED_VARIABLE(packet_size);
|
EIGEN_UNUSED_VARIABLE(packet_size);
|
||||||
@ -655,7 +655,7 @@ template<typename Packet> EIGEN_ALWAYS_INLINE void pstore_partial_common(__UNPAC
|
|||||||
// some versions of GCC throw "unused-but-set-parameter" (float *to).
|
// some versions of GCC throw "unused-but-set-parameter" (float *to).
|
||||||
// ignoring these warnings for now.
|
// ignoring these warnings for now.
|
||||||
const Index packet_size = unpacket_traits<Packet>::size;
|
const Index packet_size = unpacket_traits<Packet>::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));
|
const Index size = sizeof(__UNPACK_TYPE__(Packet));
|
||||||
#ifdef _ARCH_PWR9
|
#ifdef _ARCH_PWR9
|
||||||
EIGEN_UNUSED_VARIABLE(packet_size);
|
EIGEN_UNUSED_VARIABLE(packet_size);
|
||||||
@ -815,7 +815,7 @@ pbroadcast4<Packet4i>(const int *a,
|
|||||||
template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet pgather_common(const __UNPACK_TYPE__(Packet)* from, Index stride, const Index n = unpacket_traits<Packet>::size)
|
template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet pgather_common(const __UNPACK_TYPE__(Packet)* from, Index stride, const Index n = unpacket_traits<Packet>::size)
|
||||||
{
|
{
|
||||||
EIGEN_ALIGN16 __UNPACK_TYPE__(Packet) a[unpacket_traits<Packet>::size];
|
EIGEN_ALIGN16 __UNPACK_TYPE__(Packet) a[unpacket_traits<Packet>::size];
|
||||||
eigen_assert(n <= unpacket_traits<Packet>::size && "number of elements will gather past end of packet");
|
eigen_internal_assert(n <= unpacket_traits<Packet>::size && "number of elements will gather past end of packet");
|
||||||
LOAD_STORE_UNROLL_16
|
LOAD_STORE_UNROLL_16
|
||||||
for (Index i = 0; i < n; i++) {
|
for (Index i = 0; i < n; i++) {
|
||||||
a[i] = from[i*stride];
|
a[i] = from[i*stride];
|
||||||
@ -897,7 +897,7 @@ template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet16uc pgather_partial<unsi
|
|||||||
template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pscatter_common(__UNPACK_TYPE__(Packet)* to, const Packet& from, Index stride, const Index n = unpacket_traits<Packet>::size)
|
template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pscatter_common(__UNPACK_TYPE__(Packet)* to, const Packet& from, Index stride, const Index n = unpacket_traits<Packet>::size)
|
||||||
{
|
{
|
||||||
EIGEN_ALIGN16 __UNPACK_TYPE__(Packet) a[unpacket_traits<Packet>::size];
|
EIGEN_ALIGN16 __UNPACK_TYPE__(Packet) a[unpacket_traits<Packet>::size];
|
||||||
eigen_assert(n <= unpacket_traits<Packet>::size && "number of elements will scatter past end of packet");
|
eigen_internal_assert(n <= unpacket_traits<Packet>::size && "number of elements will scatter past end of packet");
|
||||||
pstore<__UNPACK_TYPE__(Packet)>(a, from);
|
pstore<__UNPACK_TYPE__(Packet)>(a, from);
|
||||||
LOAD_STORE_UNROLL_16
|
LOAD_STORE_UNROLL_16
|
||||||
for (Index i = 0; i < n; i++) {
|
for (Index i = 0; i < n; i++) {
|
||||||
@ -1243,7 +1243,7 @@ template<> EIGEN_STRONG_INLINE Packet16uc ploadu<Packet16uc>(const unsigned char
|
|||||||
template<typename Packet> EIGEN_ALWAYS_INLINE Packet ploadu_partial_common(const __UNPACK_TYPE__(Packet)* from, const Index n)
|
template<typename Packet> EIGEN_ALWAYS_INLINE Packet ploadu_partial_common(const __UNPACK_TYPE__(Packet)* from, const Index n)
|
||||||
{
|
{
|
||||||
const Index packet_size = unpacket_traits<Packet>::size;
|
const Index packet_size = unpacket_traits<Packet>::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));
|
const Index size = sizeof(__UNPACK_TYPE__(Packet));
|
||||||
#ifdef _ARCH_PWR9
|
#ifdef _ARCH_PWR9
|
||||||
EIGEN_UNUSED_VARIABLE(packet_size);
|
EIGEN_UNUSED_VARIABLE(packet_size);
|
||||||
@ -1431,7 +1431,7 @@ template<> EIGEN_STRONG_INLINE void pstoreu<unsigned char>(unsigned char* t
|
|||||||
template<typename Packet> EIGEN_ALWAYS_INLINE void pstoreu_partial_common(__UNPACK_TYPE__(Packet)* to, const Packet& from, const Index n)
|
template<typename Packet> EIGEN_ALWAYS_INLINE void pstoreu_partial_common(__UNPACK_TYPE__(Packet)* to, const Packet& from, const Index n)
|
||||||
{
|
{
|
||||||
const Index packet_size = unpacket_traits<Packet>::size;
|
const Index packet_size = unpacket_traits<Packet>::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));
|
const Index size = sizeof(__UNPACK_TYPE__(Packet));
|
||||||
#ifdef _ARCH_PWR9
|
#ifdef _ARCH_PWR9
|
||||||
EIGEN_UNUSED_VARIABLE(packet_size);
|
EIGEN_UNUSED_VARIABLE(packet_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user