This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [RFC] Generalizing the library to arbitrary floating-point modes
- From: François-Xavier Coudert <fxcoudert at gmail dot com>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: Tobias dot Schlueter at physik dot uni-muenchen dot de, gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 30 Nov 2005 17:43:48 +0100
- Subject: Re: [RFC] Generalizing the library to arbitrary floating-point modes
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fYJJADWE5kwCVSiI+rMqKFL2ibh7m56tV1+yLSYE1u8I9BqQkzvEcmjep7fNbMldu1qgERIRDKupJhbLkHL+DNQj/tFNY75cPMLA8E4IT3kmHgviZ0hvjeT6HOm37imSU9ugvAeekOs+UfopT17RkMQZ3EVsPxGizt7csFV9now=
- References: <19c433eb0511300536u5891b76j114c13a5f73ff6ef@mail.gmail.com> <1133359319.438db0d799399@www.cip.physik.uni-muenchen.de> <438DD573.2050301@wanadoo.fr>
> Would the way round this be to use the C names for the types, rather
> than the kind?
>
> eg. matmul_i.c, matmul_l.c, matmul_ll.c, matmul_f.c, matmul_d.c and
> matmul_ld.c, with the C-types matching the functon names. The fortran
> front-end could then sort out what kind a long double is and make
> adjustments accordingly.
Sounds a little bit more obscure to me (because "double" is no-suffix,
but you would need to use "d" for it, which looks like "decimal", and
so on), or difficult if you choose to use the complete C kind name
(because the C type can contain spaces in it, or underscores like
__float128, while the Fortran kind is really unique).
I'm not sure I understand why you want to do this: the front-end knows
about Fortran kinds, and we wants it to call library functions by
their kind, not type. It even lead me to some dreams where the
compiler doesn't call sqrtl itself, but calls gfortran_sqrt_4, which
is set (by the library) to be an alias for sqrtf. Unfortunately, my
poor understanding of the dynamic and statc linking processes doesn't
allow me to know if that dream could become reality :(
FX