This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: libmvec in gcc to have vector math in fortran
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: Jakub Jelinek <jakub at redhat dot com>, szabolcs dot nagy at arm dot com, Janne Blomqvist <blomqvist dot janne at gmail dot com>, nd at arm dot com, GCC Development <gcc at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, sellcey at cavium dot com
- Date: Fri, 15 Jun 2018 10:39:52 +0200
- Subject: Re: libmvec in gcc to have vector math in fortran
- References: <6a8d496b-d830-5eb2-eba3-c2e452d06493@arm.com> <CAO9iq9FvH9Mbmec+tDO5_31vaKiu3p=WGhAXuFFUq8EJEeiQ-g@mail.gmail.com> <80c395e1-9de5-1d9c-35b6-1ccfdfa6a9e5@arm.com> <20180410102954.GB8577@tucnak> <CAFiYyc36_0n2Wn4huhAQO3C+J_ohJhUZqcE2+6m+tkU3m6LvoQ@mail.gmail.com> <20180410130655.GD8577@tucnak> <CAFiYyc361TAA3Fos=hfY-C11KhhF-gU4qXZd49TfJNXFevRU4g@mail.gmail.com> <877en01nvw.fsf@mid.deneb.enyo.de>
On Fri, Jun 15, 2018 at 9:59 AM Florian Weimer <fw@deneb.enyo.de> wrote:
>
> * Richard Biener:
>
> > 'pure' makes it pure but there doesn't seem to be a way to make it const?
>
> Does Fortran support setting the rounding mode?
>
> In C, sin is not const because it depends on the current rounding
> mode.
It is (well, the GCC builtin) by default because -fno-rounding-math
is default. Note that using "reads global memory" (aka pure and not
const) is a bit of a stretch for "accesses the FP state" ;) It's basically
a workaround for the fact that GCC doesn't "implement" FENV access.
That said, good to see some glibc folks jump in on this thread.
I'd like to see glibc provide a fortran intrinsic header advertising
the libmvec routines it has. We probably do need some gfortran
adjustments here but I think that glibc advertising is better than
hard-coding lists into GCC (like we do for some targets with
their -mveclibabi= option).
Richard.