aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <benoitjacob@google.com>2015-02-27 10:01:59 -0500
committerGravatar Benoit Jacob <benoitjacob@google.com>2015-02-27 10:01:59 -0500
commitb7fc8746e07556404672b4da2d53dd323c441634 (patch)
tree657b3983fea2ad529d50119c2af19cf20779709d
parentf074bb4b5f6ddf0a67348365499a5c5c335a5e17 (diff)
Replace a static assert by a runtime one, fixes the build of unit tests on ARM
Also safely assert in the non-implemented path that should never be taken in practice, and would return wrong results.
-rw-r--r--Eigen/src/Core/GenericPacketMath.h7
-rw-r--r--Eigen/src/Core/util/StaticAssert.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h
index 967a07df5..afdd6f71e 100644
--- a/Eigen/src/Core/GenericPacketMath.h
+++ b/Eigen/src/Core/GenericPacketMath.h
@@ -290,7 +290,11 @@ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet preverse(const Packet&
template<size_t offset, typename Packet>
struct protate_impl
{
- static Packet run(const Packet& a) { return a; }
+ static Packet run(const Packet& a)
+ {
+ eigen_assert(false && "unimplemented");
+ return a;
+ }
};
/** \internal \returns a packet with the coefficients rotated to the right in little-endian convention,
@@ -299,7 +303,6 @@ struct protate_impl
*/
template<size_t offset, typename Packet> EIGEN_DEVICE_FUNC inline Packet protate(const Packet& a)
{
- EIGEN_STATIC_ASSERT(offset < unpacket_traits<Packet>::size, ROTATION_BY_ILLEGAL_OFFSET);
return offset ? protate_impl<offset, Packet>::run(a) : a;
}
diff --git a/Eigen/src/Core/util/StaticAssert.h b/Eigen/src/Core/util/StaticAssert.h
index 5e16b775b..7538a0633 100644
--- a/Eigen/src/Core/util/StaticAssert.h
+++ b/Eigen/src/Core/util/StaticAssert.h
@@ -93,8 +93,7 @@
THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH,
OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG,
IMPLICIT_CONVERSION_TO_SCALAR_IS_FOR_INNER_PRODUCT_ONLY,
- STORAGE_LAYOUT_DOES_NOT_MATCH,
- ROTATION_BY_ILLEGAL_OFFSET
+ STORAGE_LAYOUT_DOES_NOT_MATCH
};
};