[IPOL discuss] the problem with Eigen (and other embedded libraries)
Nicolas Limare
nicolas.limare at cmla.ens-cachan.fr
Tue Nov 8 14:43:02 CET 2011
> In my opinion, authors should have the freedom to:
> 1) Write all the auxiliar algorithms they need, by themselves. If they
> consider they need to re-code again the routines to sort arrays, to
> compute SVD decompositions, etc, they should be able to do it.
They currently are allowed to do it, and I saw no proposition to
change it.
> 2) On the other hand, I think that most of the authors don't need to
> re-write again those auxiliar routines that aren't a relevant part of
> their algorithm. For example, if a sorting routine is needed, it should be
> enough to say that you're using some algorithm that haves a O(n log(N))
> eficiency, for example, to understand the article.
>
> In my opinion, a general library with the most common operations should be
> available to avoid forcing authors to re-write common operations and to
> help code to be more understandable.
The C++ standard template library has a collection of such generic
algorithms. If you just want to sort (anything, notr just arrays of
numbers), you have the good old qsort() in the C standard library. For
more fancy things, inclusing linear algebra, stats, polynomials,
wavelets, ... GSL still is the only library I know to provide all that
in a single place with a consistent interface.
-> http://en.cppreference.com/w/cpp/algorithm
-> http://www.gnu.org/software/gsl/manual/html_node/
Seeing how often this "math library" question is raised, maybe the
redaction of the software guidelines is the good opportunity to decide
if we allow GSL as an external library or not.
* The numerical quality of this library has not been questioned.
* The API stability is strong, with a 1.0 release 10 years ago, and
the official statement «GSL is a mature library with a stable
API. The main emphasis is on ensuring the stability of the existing
functions, tidying up and fixing any bugs that are reported.»
* The library is still maintained, and its web page lists many other
projets relying on it.
* Other features are anounced:
- It is intended for ordinary scientific users. Anyone who knows
some C programming will be able to start using the library
straight-away.
- The library is thread-safe.
- The library is easy to compile and does not have any dependencies
on other packages.
The only remaining question is the portability. Can Mac users check if
a recent GSL version is available from package managers? Can Windows
users see how good is the gnuwin32 package[1], or if another simple
solution is available for Windows? If we has such a solution, it would
be similar to the current libpng or fftw situation, so I would see no
reason to refuse the use of GSL in IPOL software.
[1] http://gnuwin32.sourceforge.net/packages/gsl.htm
This would not mean that everyone must use GSL, and some authors would
probably prefer writing their own implementation of simple algorithms,
but it would be another possibility offered to the authors.
--
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/20111108/33233cd6/attachment.pgp>
More information about the discuss
mailing list