|Re: [eigen] General questions about vectorization/alignment AGAIN|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] General questions about vectorization/alignment AGAIN
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 18 Jan 2011 10:02:51 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=e6btucr3+5y9QUC9ACcjoheBrEHLCv6ca9bqC3G+PSY=; b=Yb6WpDPoiDXEXgKSg+lcjUpNKeHtLHw6DtfT4U/iACqxfDnnVFstcXTwcZv/oYrYkl nGF7i35wikmRCCQbyJ1ErCaO7XxgISyQRjbqajmtrDoCLU9+9z9qUoZfN0x4gFxXX0VD c6P1fAxaHdhxIFuuNH7NQiBbqaROZOx8ppACU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=XP0Vf8up9DEhUGfw+tnSoDozWW7CHsK6nwb4j+yAIbqUZv+QC7WkqDhYiG7zSvuMB4 XCph0g3Gp5y98YAeCWeCb+zwYMQE/yFC5f1M0lyw0TfGy7t0HYNb5r/WQ8CLYd2QZmr1 VpuFl/T6tIft114hD/0mYelHK4ffhstfrwVmk=
2011/1/17 hauke strasdat <strasdat@xxxxxxxxx>:
> Hi all,
> Once again thanks for developing such a great matrix library!
> Form the user's/programmer's view of Eigen3, vectorization/alignment
> is one of the most complicated issues. I very much appreciate the
> documentation you added which describes this issue in detail.
> I read through the documentation
> and also skipped through the mailing list. Though, I still have a
> couple of open question which might also be of general interest.
> * It seems like that all issues regarding alignment only occur on
> 32-bit operation systems, right?
Depends on your operating system. Alignment issues only occur on
systems where the default malloc() does not already return 16-byte
malloc is 16-byte aligned at least in Win64, Linux x86-64, Mac OSX,
and FreeBSD 6+. Look at Core/util/Memory.h.
But there *may* theoretically exist 64bit OSes without a 16-byte
aligned malloc. Probably some unices.
> (Would be nice to add this info to
No interest in incitating users to write non-portable code.
> Btw., which is the easiest way to test the code on a 64-bit OS? I
> used virtual box to setup a 32-bit OS. Is there an easier option?)
you can always override your system's default memory allocator. Or you
can explicitly construct objects at an unaligned location using
placement new or reinterpret_cast, that's what we do in the tests.