Re: [eigen] std::vector specialization |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] std::vector specialization
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 26 Jan 2010 07:12:45 -0500
- 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; bh=Psz+VMMW0oLwQYgFNzJMZC+HL7nRyCj3CnyrLnkKLi4=; b=cYOdYi33nAEACX8TYqm7r+ADeYPchjW+ivenqEfI1kSQ3D4KDJxSwUOdrsffLAT/7F 1UDHSiBsDf8RvRLOta5CApDKU1w5RAMkbmVaUhkzGiC1NpoeKl+pH446QsQnzY3PT8L/ cTyIC73qg7gR7Pu0pP2/ZXxjuWjPL1e9NO17c=
- 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=Prr44p5a0ZJZZnUoedF0AdbmE0N9RKhjFhmnJULut4aq7bSOfQ+0ufzmBNPCwXdRuq czR/1n/erR+3ePgB+E4bSQiuA+MO9EmyY8FWqWDvtiXIdIbQtDrVWKBUfFUYWlaOkDmO 9UPF/w2YQmS4H0qAgHTZoSoOVd49opapwQSMs=
Ok, well, at least it's optional and doesn't do anything unless you
use it. So why not!
Remarks on naming:
EXPLICIT_INSTANTIATION
---> needs EIGEN_ prefix
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION_TPL
---> not sure about the _TPL at the end. How about removing it?
Finally, if you push such a patch, please at a new section at the bottom of
http://eigen.tuxfamily.org/dox-devel/StlContainers.html
explaining this possibility, and importantly, making clear that it's
only a convenience feature and not required!
Benoit
2010/1/26 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> Oh, and one more drawback... it requires explicit instantiation of
> std::vector<T> on ICC and GCC.
>
> But still, one could adapt the documentation such that it advises the
> user to go for the manual declarations with aligned_allocator in all
> interfaces and emphasize that using the macro is not recommended but
> just for the lazy people using new compilers. If that were
> acceptable... no idea.
>
> - Hauke
>
> On Tue, Jan 26, 2010 at 10:39 AM, Hauke Heibel
> <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>> On Tue, Jan 26, 2010 at 10:34 AM, Thomas Capricelli
>> <orzel@xxxxxxxxxxxxxxx> wrote:
>>>
>>> I just have two thoughts about this (but please note that I dont know much about this topic)
>>>
>>> 1) I'm surprised that you dont have more problems with variadic macros, i remember it was a porting nightmare.
>>> 2) there's no unit test... why ? (is it impossible?). You said you've tested this with three compilers... the code you've used for this is probably easy to turn into unit tests, no ?
>>
>> I modified the existing test\stdvector.cpp - it's now attached. Just
>> forgot to add it to the patch. Of course this is just a temporary unit
>> test since it does not test the usage of the manual allocator
>> definition anymore. The attached version contains the define as well
>> as the unit test.
>>
>> Regards,
>> Hauke
>>
>
>
>