* Vector data types in fortran
@ 2008-01-15 15:55 burlen
2008-01-17 2:14 ` Dorit Nuzman
0 siblings, 1 reply; 2+ messages in thread
From: burlen @ 2008-01-15 15:55 UTC (permalink / raw)
To: gcc-help
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?
thanks in advance
Burlen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Vector data types in fortran
2008-01-15 15:55 Vector data types in fortran burlen
@ 2008-01-17 2:14 ` Dorit Nuzman
0 siblings, 0 replies; 2+ messages in thread
From: Dorit Nuzman @ 2008-01-17 2:14 UTC (permalink / raw)
To: burlen; +Cc: gcc-help
> 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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-16 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-15 15:55 Vector data types in fortran burlen
2008-01-17 2:14 ` Dorit Nuzman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).