This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Vector data types in fortran
- From: Dorit Nuzman <DORIT at il dot ibm dot com>
- To: burlen <burlen at apollo dot sr dot unh dot edu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 16 Jan 2008 15:21:18 +0200
- Subject: Re: Vector data types in fortran
> Hi,
> I have a finite difference code written in fortran, currently I use g77
> to build this code. I would like to know if it is possible to leverage
> gcc vector data types, and SSE instructions etc within the fortran code.
> I notice that when using C it is possible to declare variables as vector
> type. A while back we tried to let the fortran compiler(I think it was
> actually pgf) automagically vectorize but we only got about 10% speed
> up. We should get significantly more if all the potential loops were
> vectorized. I would like to hand tune some of the code. Is it going to
> be possible to vectorize the fortran code using g77/gfortran? Where can
> more information be found?
-ftree-vectorize enables vectorization in gcc (enabled by default under -O3
since gcc4.3). You may also need to use -fassociative-math if you have
reductions on floats. There's some information here:
http://gcc.gnu.org/projects/tree-ssa/vectorization.html, but not much
tuning hints and such. You can use -ftree-vectorizer-verbose=#, which will
report which loops got vectorized and which not and why.
dorit
> thanks in advance
> Burlen
>
>