From: Jerry DeLisle <jvdelisle@charter.net>
To: Thomas Koenig <tkoenig@netcologne.de>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, libfortran] Speed up cshift for dim > 1
Date: Fri, 16 Jun 2017 17:19:00 -0000 [thread overview]
Message-ID: <fd162fd6-df7f-54db-24ad-adc1ba990fbf@charter.net> (raw)
In-Reply-To: <2c24688d-22e5-efde-4429-1eab756360a5@netcologne.de>
On 06/14/2017 12:41 PM, Thomas Koenig wrote:
> Hello world,
>
> the attached patch implements a blocked algorithm for
> improving the speed of cshift for dim > 1.
>
> It uses the fact that
>
> integer, dimension (n1,n2,n3) :: a, b
>
> b = cshift(a,shift,3)
>
> is identical, as far as the memory locations is concerned.
>
> integer, dimension (n1*n2*n3) :: c, d
> d = cshift(c, shift*n1*n2, 1)
>
> The speedup is quite large; from being really slow for
> dim > 1, this patch makes it go even faster.
>
> Below there are some comparisons for the attached benchmark,
> do-1.f90. gfortran-7 uses the old library version.
>
> Interestingly, the library version is also much faster
> than an implementation of straight DO loops.
>
> Regression-tested. OK for trunk?
>
OK for trunk.
Thanks,
Jerry
next prev parent reply other threads:[~2017-06-16 17:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 19:42 Thomas Koenig
2017-06-16 17:19 ` Jerry DeLisle [this message]
2017-06-18 18:16 ` Thomas Koenig
2017-06-16 15:14 Dominique d'Humières
2017-06-19 18:01 ` Thomas Koenig
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=fd162fd6-df7f-54db-24ad-adc1ba990fbf@charter.net \
--to=jvdelisle@charter.net \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tkoenig@netcologne.de \
/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).