Re: [eigen] binary bloat with recent sse stuff |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] binary bloat with recent sse stuff
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Sat, 4 Apr 2009 10:22:53 +0530
- 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=pMxtMWoG0KYrKQh/RFLFY8ngUPIEoqMKNA7iqQf8IGc=; b=tY+ncBPOVbHv9evymL6t2RBMCUN1uMfjVJ9ZlBiP6wW40E+wKSNNC+xiY9qmZrnjQy GAOV7Z8ASA4ie5LMGhXYfg6/JaddwwGy3UkkhrqSQ7wiFo6jEwZcdW86d5VxHeoFLST7 1M0onKcrNTwxNnlnJoJDXZHItOvGnBc6vXBzw=
- 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=FA3D0Kz3wfS3SyA8G51TLnmYaBrpd9M4Xa5GI79TNV9e1wKaf156JzsKea95ezR2Xc UZyZsyCC38kp5DFLNyKDC07wQjnyDns/3/1AlaGbD9hqp8vzyX0MomUmOPTkbz3TfWX9 NnnoaiOtaZd+sc1k/gXvAv8iMGWqerhjlqUN4=
Whoops, 17KB for a null program.
The function specific constants (for sin,cos,log,exp) could be rolled
into the function body so that they are not visible outside. If the
functions are not instantiated, may be they won't be generated. Also,
what does compiling with -Os give?
On Sat, Apr 4, 2009 at 1:54 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> Hi,
>
> Take the following advanced program:
>
> #include <Eigen/Core>
> int main(){}
>
> Compile with -msse2 and look at the generated symbols:
>
> bjacob@kiwi:~> g++ -msse2 -O2 -I kde/kdesupport/eigen2/ b.cpp -o b &&
> nm b | grep Eigen
> 080485e0 t _GLOBAL__I__ZN5Eigen7ei_plogIU8__vectorfEET_S2_
> 08048a20 T _ZN5Eigen7ei_pcosIU8__vectorfEET_S2_
> 08048c00 T _ZN5Eigen7ei_pexpIU8__vectorfEET_S2_
> 08048cc0 T _ZN5Eigen7ei_plogIU8__vectorfEET_S2_
> 08048b10 T _ZN5Eigen7ei_psinIU8__vectorfEET_S2_
> 0804a2f0 b _ZN5EigenL10ei_p4f_2piE
> 0804a050 b _ZN5EigenL11ei_p4f_halfE
> 0804a0d0 b _ZN5EigenL11ei_p4i_0x7fE
> 0804a0a0 b _ZN5EigenL11ei_p4i_not1E
> 0804a1a0 b _ZN5EigenL13ei_p4f_exp_hiE
> 0804a1b0 b _ZN5EigenL13ei_p4f_exp_loE
> 0804a2b0 b _ZN5EigenL16ei_p4f_coscof_p0E
> 0804a2c0 b _ZN5EigenL16ei_p4f_coscof_p1E
> 0804a2d0 b _ZN5EigenL16ei_p4f_coscof_p2E
> 0804a080 b _ZN5EigenL16ei_p4f_sign_maskE
> 0804a280 b _ZN5EigenL16ei_p4f_sincof_p0E
> 0804a290 b _ZN5EigenL16ei_p4f_sincof_p1E
> 0804a2a0 b _ZN5EigenL16ei_p4f_sincof_p2E
> 0804a2e0 b _ZN5EigenL18ei_p4f_cephes_FOPIE
> 0804a060 b _ZN5EigenL19ei_p4f_min_norm_posE
> 0804a1c0 b _ZN5EigenL20ei_p4f_cephes_LOG2EFE
> 0804a0e0 b _ZN5EigenL20ei_p4f_cephes_SQRTHFE
> 0804a1d0 b _ZN5EigenL20ei_p4f_cephes_exp_C1E
> 0804a1e0 b _ZN5EigenL20ei_p4f_cephes_exp_C2E
> 0804a1f0 b _ZN5EigenL20ei_p4f_cephes_exp_p0E
> 0804a200 b _ZN5EigenL20ei_p4f_cephes_exp_p1E
> 0804a210 b _ZN5EigenL20ei_p4f_cephes_exp_p2E
> 0804a220 b _ZN5EigenL20ei_p4f_cephes_exp_p3E
> 0804a230 b _ZN5EigenL20ei_p4f_cephes_exp_p4E
> 0804a240 b _ZN5EigenL20ei_p4f_cephes_exp_p5E
> 0804a0f0 b _ZN5EigenL20ei_p4f_cephes_log_p0E
> 0804a100 b _ZN5EigenL20ei_p4f_cephes_log_p1E
> 0804a110 b _ZN5EigenL20ei_p4f_cephes_log_p2E
> 0804a120 b _ZN5EigenL20ei_p4f_cephes_log_p3E
> 0804a130 b _ZN5EigenL20ei_p4f_cephes_log_p4E
> 0804a140 b _ZN5EigenL20ei_p4f_cephes_log_p5E
> 0804a150 b _ZN5EigenL20ei_p4f_cephes_log_p6E
> 0804a160 b _ZN5EigenL20ei_p4f_cephes_log_p7E
> 0804a170 b _ZN5EigenL20ei_p4f_cephes_log_p8E
> 0804a180 b _ZN5EigenL20ei_p4f_cephes_log_q1E
> 0804a190 b _ZN5EigenL20ei_p4f_cephes_log_q2E
> 0804a070 b _ZN5EigenL20ei_p4f_inv_mant_maskE
> 0804a250 b _ZN5EigenL23ei_p4f_minus_cephes_DP1E
> 0804a260 b _ZN5EigenL23ei_p4f_minus_cephes_DP2E
> 0804a270 b _ZN5EigenL23ei_p4f_minus_cephes_DP3E
> 0804a040 b _ZN5EigenL8ei_p4f_1E
> 0804a090 b _ZN5EigenL8ei_p4i_1E
> 0804a0b0 b _ZN5EigenL8ei_p4i_2E
> 0804a0c0 b _ZN5EigenL8ei_p4i_4E
>
> How can we prevent these unused constants from being generated?
>
> Also, why are the ei_pcos/sin/exp/log functions being generated?
>
> The code size is 17 kB.
>
> Benoit
>
>
>
--
Rohit Garg
http://rpg-314.blogspot.com/
Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay