Re: [eigen] Std Vector again |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Std Vector again
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 26 Jun 2009 22:00:56 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=zPzyPf52G1CH4bbVTyklRaDd03HR+K+3+t3U8jtUeF0=; b=xutaVuV9k8RCckiegqAu1if77iIdFmYZZPWeV/Au3ofCgUURJghawha+AywfKOcsP9 mEBIbfJFxDfhDh8ThRCMbLXRLZ3T9miDGKCCEpagAow0NKcFiqSaHoh8jWbkQj+O0rmJ LZaZubcFqZxdEaJW0z+0rNJSFJBo4p98K5jiE=
- 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=Pz7jdPGRtPB5tEQdry1R1blaLO1qxictzDXGFUD2Sq0OdsvY0Ud1XAxq14/2gI143x EziUTv0dwHleMwsUnF83SAjPF+aartx3JvwGLREOMNYrPc8oE4A/cZf8cm0/2jCY6hiW m9KHruXCODB7BnUlNFx2C+/8xmekrcmYhU0zk=
2009/6/26 Patrick Mihelich <patrick.mihelich@xxxxxxxxx>:
> Keir,
>
> If you are already using Boost, I suggest sidestepping the Eigen/std::vector
> quandary and instead using the vector implementation in Boost.Interprocess
> for Eigen types. Although it (currently) lives in Interprocess, it's a fully
> generic implementation of STL vector that fixes the resize flaw and has some
> other niceties such as support for move semantics.
>
> Current C++ may not have templated typedefs, but you can get some of the
> same benefits from a simple meta-program:
>
> #include <boost/interprocess/containers/vector.hpp>
>
> template<typename T>
> struct AlignedVector
> {
> typedef boost::interprocess::vector<T, Eigen::aligned_allocator<T> > type;
> };
>
> AlignedVector<Vector4f>::type my_vec;
I think you need a typename keyword here ;)
Benoit