diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-11 11:53:10 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-11 11:53:10 +0000 |
commit | 809eeb728b862cdbd28c5751a80f9405324ef598 (patch) | |
tree | 63bacbf33888566ca542b0afb6362f5beb563cd0 /gcc/testsuite | |
parent | eb2fddbe975bc486caf751c7de0879f7d63b4ce0 (diff) | |
download | gcc-809eeb728b862cdbd28c5751a80f9405324ef598.tar.gz |
2011-04-11 Basile Starynkevitch <basile@starynkevitch.net>
* melt/xtramelt-ana-base.melt
(gimple_seq_first_stmt,gimple_seq_last_stmt): New primitives.
* testsuite/melt/topengpu-0.c: Indent better.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@172254 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/melt/topengpu-0.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/testsuite/melt/topengpu-0.c b/gcc/testsuite/melt/topengpu-0.c index 0b9531293aa..5dafa635129 100644 --- a/gcc/testsuite/melt/topengpu-0.c +++ b/gcc/testsuite/melt/topengpu-0.c @@ -5,21 +5,26 @@ ./cc1 -std=gnu99 -fmelt-mode=opengpu -fmelt-module-path=melt-modules -fmelt-source-path=melt-sources -fmelt-debug -O2 -fgraphite -floop-parallelize-all topengpu-0.c ## it could be useful to pass -fdump-tree-all -fdump-ipa-all */ -float foobar(int sz, - float tres[static restrict sz], - float tx[static restrict sz], - float ty[static restrict sz], - float tz[static restrict sz]) +float foobar (int sz, + /* we mean that all four arrays tr tx ty tz cannot be + aliases, and they each are sized by sz ; See + http://www.lysator.liu.se/c/restrict.html */ + float tr[static restrict sz], + float tx[static restrict sz], + float ty[static restrict sz], + float tz[static restrict sz]) { float r = 0.0; // I expect this loop to be parallel for (int i=0; i<sz; i++) { - tres[i] = tx[i] + ty[i] * tz[i]; + tr[i] = + tx[i] + + ty[i] * tz[i]; } for (int i=0; i<sz; i++) { - r += tres[i]; + r += tr[i]; } return r; } |