This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: A templated GSL version
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Walter Schreppers <wschrep at leibniz dot ruca dot ua dot ac dot be>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Wed, 12 Nov 2003 13:23:55 +0000
- Subject: Re: A templated GSL version
- References: <1068472909.14142.20.camel@leibniz.ruca.ua.ac.be>
Walter Schreppers writes:
> Hi,
>
> I was wondering if anyone has made efforts to make GSL templated.
No, apart from the existing use of macros for the vector/ and matrix/
source files.
> The problem with the existing C++ wrappers is that only the
> standard types: long, double, float etc. work with the
> routines. The reason for asking is that we are verry interested in
> using gsl with our own multiprecision, multibase library
> Arithmos. So far we found a couple of matrix libraries which are
> able to use our multiprecision types: uBlas, gmm++, mtl,
> itl. Unfortunately none of these provide the same amount of
> functionality as gsl. We also tried to use a precompiler (with
> similar goals as the SWIG tool) to convert the gsl sources but it
> still required a lot of manual modifications when we tried to
> convert the routines using blas (mainly replacing malloc's by new
> and delete operations because mallocs do not work with C++ classes
> such as our Mpieee class). We also fear that manual conversion is
> a waste of time because the effort will be lost when a new release
> of GSL comes out.
It is a difficult problem, as C was not designed with this type of
purpose in mind.
--
Brian Gough