Re: [eigen] on extern template instanciation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] on extern template instanciation
- From: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>
- Date: Sat, 14 Jun 2008 12:23:59 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=3dEK35PMR4mVIbyK7XY/qjdHA39wK4BAuqF20Bu1NKA=; b=EsgTKqunYV0edEx4FxTlh8ZuIIjgoJ4xLOnJt9YZYlfP5DVd2MAzHs/mO+HeKkTVR3 F1NjKrInGnY9Ci07vMIjekX7eOgMCiWlz+TIoe6nrB3x9wmcrVsy8FUWYyxItJPENgTu V3D4DC8foOD2Ct78YEIZj3wkXXMYMmmCAfQHM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=aVAh/WErkzxfojNTXRbDokuTEYfwbx3LtrpOcFRXIChjhOJYprcfwjN+KFYJ3+IHAR JQfHzcxCi7h8ag/Aurrs1GqxUgbHJT+a9Rzy4WrAYOYjJH8iaISBxcExeWwPT5PD0goQ uVlCYJhELz8/lJiv1f5hBuM1t/C176H9QF83k=
On Sat, Jun 14, 2008 at 11:18 AM, Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote:
> so it looks like -finline-functions has priority over attribute(noinline).
> Strange indeed, the local attribute is wiser than the global gcc option so it
> should have priority....
>
> Worst case, the gcc man page lists the 4 cxxflags that -O3 adds over -O2 so
> you could always use -O2 plus the 3 other flags...
sure, or just add -fno-inline-functions after the -O3, but that's not
a real solution.
what about the following: we give two levels to EIGEN_EXTERN_INSTANTIATIONS.
so:
if EIGEN_EXTERN_INSTANTIATIONS==1 then we only declare the extern templates
if EIGEN_EXTERN_INSTANTIATIONS==2 then we declare the extern
templates + hide the heavy code using a pair of #if
EIGEN_EXTERN_INSTANTIATIONS<2 / #endif
that's a bit complicated for the user:
- if he does not need -finline-functions then define it to 1
- otherwise define it to 2 and take care when you use non-common types
(i.e re-define EIGEN_EXTERN_INSTANTIATIONS=1 before including eigen
headers)
but I cannot see a better solution until gcc changes this behavior.
FYI, I suggested that could be a gcc bug on gcc-help and if I don't
get any reply soon I'll report a bug.
gael.