public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dorit Nuzman <DORIT@il.ibm.com>
To: burlen <burlen@apollo.sr.unh.edu>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Vector data types in fortran
Date: Thu, 17 Jan 2008 02:14:00 -0000	[thread overview]
Message-ID: <OFCC76EC2E.A38BD116-ONC22573D2.0048B377-C22573D2.00495C91@il.ibm.com> (raw)
In-Reply-To: <478B8382.9050602@apollo.sr.unh.edu>

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

      reply	other threads:[~2008-01-16 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15 15:55 burlen
2008-01-17  2:14 ` Dorit Nuzman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFCC76EC2E.A38BD116-ONC22573D2.0048B377-C22573D2.00495C91@il.ibm.com \
    --to=dorit@il.ibm.com \
    --cc=burlen@apollo.sr.unh.edu \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).