Re: [eigen] StdVector

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Tue, Apr 21, 2009 at 2:08 PM, Markus Moll
<markus.moll@xxxxxxxxxxxxxxxx> wrote:
> On Tuesday 21 April 2009 13:47:34 Gael Guennebaud wrote:
>> UPDATE
>>
>> rev 957053 should also fix the linkage issue. At least with my trivial
>> example it now works. So please, Markus (and others), can you tell us
>> if that work for you ?
>
> Sort of. The linker error is obviously gone, but the vector interface is still
> incorrect (it's at least missing a templated constructor from an iterator
> range, which makes existing code fail to compile), and to me it still feels
> very wrong to manipulate std::vector. I like the idea of forcing the user to
> use aligned_allocator _a lot_ better.

I fixed that issue 5 mn ago !

Note that even if we enforce the user to use aligned_allocator, we
still have to reimplement the tricky resize functions that is the main
limitation because it depends on the platform

So basically, the only difference is that we would avoid the ugly
#define vector std_vector when including <vector>. But I don't think
that's a good reason to not keep the current solution which is simpler
to use.

>> The current solution still only require the inclusion of
>> Eigen/StdVector without any other change.
>
> The question remains: is that worth it? And why only for std::vector? (leaving
> the resize problem aside)

because other stl types do not exhibit the "bug" of the resize
function. So, for other types just use aligned_allocator.

gael.


> Markus
> --
> PGP key on www.esat.kuleuven.be/~mmoll/public_key.pgp
> Fingerprint is
> 90C4 B47D 1A00 5AC1 9147  3197 EDA7 1E0E 99E4 9EDB
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/