mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
let the user disable alignment altogether by #defining EIGEN_DONT_ALIGN.
Until now, the user had to edit the source code to do that. Internally, add EIGEN_ALIGN that takes into account both EIGEN_DONT_ALIGN.and EIGEN_ARCH_WANTS_ALIGNMENT. From now on, only EIGEN_ALIGN should be used to test whether we want to align.
This commit is contained in:
@@ -92,7 +92,7 @@ void check_unalignedassert_good()
|
||||
delete[] y;
|
||||
}
|
||||
|
||||
#if EIGEN_ARCH_WANTS_ALIGNMENT
|
||||
#if EIGEN_ALIGN
|
||||
template<typename T>
|
||||
void check_unalignedassert_bad()
|
||||
{
|
||||
@@ -109,7 +109,7 @@ void unalignedassert()
|
||||
check_unalignedassert_good<Good1>();
|
||||
check_unalignedassert_good<Good2>();
|
||||
check_unalignedassert_good<Good3>();
|
||||
#if EIGEN_ARCH_WANTS_ALIGNMENT
|
||||
#if EIGEN_ALIGN
|
||||
VERIFY_RAISES_ASSERT(check_unalignedassert_bad<Bad4>());
|
||||
VERIFY_RAISES_ASSERT(check_unalignedassert_bad<Bad5>());
|
||||
VERIFY_RAISES_ASSERT(check_unalignedassert_bad<Bad6>());
|
||||
@@ -120,7 +120,7 @@ void unalignedassert()
|
||||
check_unalignedassert_good<Good9>();
|
||||
check_unalignedassert_good<Depends<true> >();
|
||||
|
||||
#if EIGEN_ARCH_WANTS_ALIGNMENT
|
||||
#if EIGEN_ALIGN
|
||||
VERIFY_RAISES_ASSERT(check_unalignedassert_bad<Depends<false> >());
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user