Vector data types in fortran
Dorit Nuzman
DORIT@il.ibm.com
Thu Jan 17 02:14:00 GMT 2008
> 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
>
>
More information about the Gcc-help
mailing list