[IPOL discuss] SVD for IPOL: which library, and how?
enric.meinhardt at upf.edu
enric.meinhardt at upf.edu
Mon Apr 4 12:46:33 CEST 2011
hi all,
My preferred solution is to use GSL (or whatever) as a black box that
computes the SVD. This is the same solution that was adopted for
using the FFTW3 as a black box that computes Fourier transforms.
Since both problems are equivalent they merit an equivalent solution.
Now, the choice of which implementation of the SVD to use is less important.
Advantages of using or "promoting" GSL:
* GSL is basically a GPL implementation of the numerical recipes. It
is large because it contains many things: special functions, ODE
solvers, optimization methods, etc. Once we promote it as an allowed
black box, we automatically have solved the problem of implementing
Runge-Kutta, conjugate gradients, incomplete beta functions, etc.
* The desired code from GSL can be easily copy-pasted into your
program, and this usage of the GSL is actually encouraged by the
documentation (cf. section 2.14). In the case of special functions
this is a single file (e.g "beta_inc.c"), but for the SVD we need to
copy also the cblas files besides the file "svd.c". That way, the
size of the whole GSL is irrelevant, and the needed files for one
method take much less than 3GB.
Eigen is also nice, but I don't see how its algorithms can be easily
used from C programs. Thus, it is probably not wise to encourage it,
because we should need a different solution for C programmers anyway.
Nicolas Limare <nicolas.limare at cmla.ens-cachan.fr>:
> So, what is your preferred solution? What should IPOL accept or promote?
In the SVD case I think that IPOL should accept any implementation of
SVD (GSL, Eigen, CImg, ...) as long as it is clearly used as a "black
box", with well-defined input and output. But only the GSL
implementation should be promoted.
regards,
enric.
More information about the discuss
mailing list