mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Remove unaligned assert tests.
Manually constructing an unaligned object declared as aligned invokes UB, so we cannot technically check for alignment from within the constructor. Newer versions of clang optimize away this check. Removing the affected tests.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
53a29c7e35
commit
0c4ae56e37
@@ -218,10 +218,6 @@ template<typename Scalar> void mapQuaternion(void){
|
||||
VERIFY_IS_APPROX(q1.coeffs(), q2.coeffs());
|
||||
VERIFY_IS_APPROX(q1.coeffs(), q3.coeffs());
|
||||
VERIFY_IS_APPROX(q4.coeffs(), q3.coeffs());
|
||||
#ifdef EIGEN_VECTORIZE
|
||||
if(internal::packet_traits<Scalar>::Vectorizable)
|
||||
VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));
|
||||
#endif
|
||||
|
||||
VERIFY_IS_APPROX(mq1 * (mq1.inverse() * v1), v1);
|
||||
VERIFY_IS_APPROX(mq1 * (mq1.conjugate() * v1), v1);
|
||||
@@ -281,10 +277,6 @@ template<typename Scalar> void quaternionAlignment(void){
|
||||
|
||||
VERIFY_IS_APPROX(q1->coeffs(), q2->coeffs());
|
||||
VERIFY_IS_APPROX(q1->coeffs(), q3->coeffs());
|
||||
#if defined(EIGEN_VECTORIZE) && EIGEN_MAX_STATIC_ALIGN_BYTES>0
|
||||
if(internal::packet_traits<Scalar>::Vectorizable && internal::packet_traits<Scalar>::size<=4)
|
||||
VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(arrayunaligned)) QuaternionA));
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename PlainObjectType> void check_const_correctness(const PlainObjectType&)
|
||||
|
||||
Reference in New Issue
Block a user