Re: [eigen] [Pool] Problems using Boost.Pool with the Eigen matrix library |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [Pool] Problems using Boost.Pool with the Eigen matrix library
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 14 Oct 2010 12:49:14 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=ELpzNj53LLKwi4esL2tj5JxiOX/sEZymuvM59nkzqkQ=; b=Bjfswdee1ehc5TMhjdg3junUW3cvgrxnBAgNhPB2j9wqRH5OMZ1ws11ODAf3AkUdOH +kyPf1+V04ODr3KvoNLvbvEfW1oE3ViXdFzNMI1AeGJ9f+xIYe7mG9kxMs6fjEv3ISX3 EExy4I8+7KQrhU4T9PWD39mIVutUIHYYKAhuE=
- 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; b=aPnYX/l0NU6xF8RTSGYOmW2ID/xYMLwjBifIRlaQ0uidXRIVVp08D6e5zqgStP/NIF OXVO6G++f9TZadRK3BbFgqjvUrOLD4r/rVmAVXkpT1a+POTu0ZqXEVfOAYIu6U05ME7Z odID+boFSeYqd3nvzk0RzAvwZKjZmeuooBGxY=
2010/10/14 <lfrfly@xxxxxxxxxxx>:
> Since Eigen matrices and vectors use SSE and therefore require a particular
> alignment, Eigen requires that when these types (specifically, the
> compile-time sized versions) are within a struct or class, that struct be
> given the EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro.
What we do require is that e.g. Vector4f's be created at 16 byte
aligned locations. EIGEN_MAKE_ALIGNED_OPERATOR_NEW is just one way of
doing that.
>
> But here's the problem. What if that struct is allocated by a
> boost::pool_allocator<T>? Is there any way to enforce alignment then?
That's a question for boost::pool_allocator, not for us; if this
allocator doesn't give you 16 byte alignment, then you need a
different allocator (or just modify this allocator to meet this
criterion).
The allocator is what gives you an address. If it's giving
non-16-byte-aligned addresses, then it can't be used.
Benoit