backported the following to 2.0:

* EIGEN_ALIGN and EIGEN_DONT_ALIGN and the corresponding logic in Macros.h
  (instead of using EIGEN_ARCH_WANTS_ALIGNMENT)
* The body of ei_aligned_malloc and ei_aligned_free

The reason for this backporting is that a user complained that with eigen 2.0 he got a warning at Memory.h:81 that the return value of posix_memalign was not used, and that function was declared with an attribute warn_unused_result.

Looking at this, it seemed that the body of this function was already overly complicated, and fixing this warning made it even worse, while the devel branch had a much simpler body and didn't suffer from that problem.

Then it was necessary to update ei_aligned_free too, and to backport EIGEN_ALIGN.

Inch' Allah....
This commit is contained in:
Benoit Jacob
2009-09-21 05:39:55 -04:00
parent d0ac4fa479
commit 6af2c2c67a
3 changed files with 50 additions and 35 deletions

View File

@@ -104,7 +104,11 @@ However there are a few corner cases where these alignment settings get overridd
\section getrid I don't care about vectorization, how do I get rid of that stuff?
Define both preprocessor symbols EIGEN_DONT_VECTORIZE and EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT.
Two possibilities:
<ul>
<li>Define EIGEN_DONT_ALIGN. That disables all 128-bit alignment code, and in particular everything vectorization-related. But do note that this in particular breaks ABI compatibility with vectorized code.</li>
<li>Or define both EIGEN_DONT_VECTORIZE and EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT. This keeps the 128-bit alignment code and thus preserves ABI compatibility.</li>
</ul>
For more information, see <a href="http://eigen.tuxfamily.org/index.php?title=FAQ#I_disabled_vectorization.2C_but_I.27m_still_getting_annoyed_about_alignment_issues.21">this FAQ</a>.