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: szabolcs dot nagy at arm dot com
- Cc: Florian Weimer <fw at deneb dot enyo dot de>, nd at arm dot com, Jakub Jelinek <jakub at redhat dot com>, Janne Blomqvist <blomqvist dot janne at gmail 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:41:40 +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> <11861654-3045-aa2d-8f37-6e5ce71ecbb3@arm.com>
On Fri, Jun 15, 2018 at 10:39 AM Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>
> On 15/06/18 08:59, Florian Weimer 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?
> >
>
> yes, but vec math is only enabled with -ffast-math (so it can
> assume -fno-rounding-math)
>
> > In C, sin is not const because it depends on the current rounding
> > mode.
> >
>
> hm i don't see const in glibc even in case of -ffast-math compilation,
> i wonder if that can be changed.
For sin() it also depends on -fno-math-errno (default for fortran) given
sin() may set errno according to the manpage (that means it isn't
even pure by default).
Richard.