* disable unalignment detection when vectorization is not enabled

* revert MapBase unalignment detection
This commit is contained in:
Gael Guennebaud 2010-08-18 09:35:55 +02:00
parent 85fdcdf055
commit ddbbd7065d
3 changed files with 5 additions and 1 deletions

View File

@ -189,7 +189,7 @@ template<typename Derived> class MapBase
EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(ei_traits<Derived>::Flags&PacketAccessBit,
ei_inner_stride_at_compile_time<Derived>::ret==1),
PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1);
ei_assert(EIGEN_IMPLIES(ei_traits<Derived>::Flags&AlignedBit, (size_t(m_data) % 16 == 0))
ei_assert(EIGEN_IMPLIES(ei_traits<Derived>::Flags&AlignedBit, (size_t(m_data) % (sizeof(Scalar)*ei_packet_traits<Scalar>::size)) == 0)
&& "data is not aligned");
}

View File

@ -134,7 +134,9 @@ template<typename Scalar> void mapQuaternion(void){
VERIFY_IS_APPROX(q1.coeffs(), q2.coeffs());
VERIFY_IS_APPROX(q1.coeffs(), q3.coeffs());
#ifdef EIGEN_VECTORIZE
VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));
#endif
}
void test_geo_quaternion()

View File

@ -45,7 +45,9 @@ template<typename VectorType> void map_class_vector(const VectorType& m)
VectorType ma3 = Map<VectorType>(array3unaligned, size);
VERIFY_IS_EQUAL(ma1, ma2);
VERIFY_IS_EQUAL(ma1, ma3);
#ifdef EIGEN_VECTORIZE
VERIFY_RAISES_ASSERT((Map<VectorType,Aligned>(array3unaligned, size)))
#endif
ei_aligned_delete(array1, size);
ei_aligned_delete(array2, size);