Re: Vector data types in fortran

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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
>
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux