[IPOL discuss] the problem with Eigen (and other embedded libraries)
Nicolas Limare
nicolas.limare at cmla.ens-cachan.fr
Sat Nov 5 22:29:10 CET 2011
Hi all,
I already wrote about the problems that can happen from embedded
libraries, with the libtiff example[1].
[1] http://tools.ipol.im/wiki/author/code/embedding_vs_security/
I had a look tonight at the Changelog for Eigen. Since version 3.0,
released March 19, 2011, there has been 3 minor updates. The changelog[2]
mentions the correction of various bugs.
syntax and memory bugs
* Standard compliance: fix aligned_allocator and remove uses of long long.
* Fix memory leak issue for scalar types throwing exceptions.
bugs related to some compilers
* Fix compilation on gcc 4.6
* Fix compilation with MSVC 2005
* Fix compilation issues with MinGW
numerical bugs
* Fix bug in trapezoidal matrix time matrix product.
* Fix asin.
* Fix solve using LDLT for singular matrices if solution exists.
* Fix infinite loop when computing SVD of some matrices with very small numbers
[2] http://eigen.tuxfamily.org/index.php?title=ChangeLog
This means that every software published in IPOL swith all the Eigen
library will have these bugs, forever. When you consider that Eigen
was used by some IPOL software for the SVD, and this SVD was buggy with
a chance of infinite loops, I think this clearly shows why including
the full code of an external library is a bad decision.
If we accept Eigen in the list of external libraries allowed for IPOL
software (someone will have to explain why we must consider Eigen
portable, widely used and stable), then every IPOL software can
use Eigen ftom the system, and just #include <Eigen>. The version
installed on the system will be updated when new versions are
released, and will correct bugs.
If we don't accept Eigen in the list of external libraries, and you
still don't want to use lapack, then I think simple stand-alone
implementations like ccmath/svdval[3] for the SVD are less likely to
need updates and corrections for specific compilers.
[3]http://dev.ipol.im/git/?p=coco/ccmath.git;a=blob;f=manual/C01-matrix#l708
--
Nicolas LIMARE - CMLA - ENS Cachan http://www.cmla.ens-cachan.fr/~limare/
IPOL - image processing on line http://www.ipol.im/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20111106/438c9fe8/attachment.pgp>
More information about the discuss
mailing list