summaryrefslogtreecommitdiff
path: root/lib/make
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-10-27 22:21:49 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-10-27 22:21:49 +0000
commitcd846335f5afd751f7cfea9855efc52b0331cc30 (patch)
treedf1ec872291fcaeb0bdfa9c1cb4e2799138f5c48 /lib/make
parent34457bea62fffbb9e73edfafe315d4434dd043cc (diff)
Improve performance of Fortran index calculations
In Fortran, Cactus currently declares grid functions e.g. as (this is the expansion of DECLARE_CCTK_ARGUMENTS) REAL*8 gxx (X0metric,X1metric,X2metric) where X0metric etc. are integers passed into the routine. Each grid function group has its own, independent size. This has two disadvantages: - The compiler does not know that all grid functions have the same size (namely cctk_lsh), and thus has to perform array index calculations separately for each group - The argument list is longer than neded The enclosed patch declares grid functions via cctk_lsh. Grid arrays are still declared independently. This reduces the code size of e.g. GRHydro/GRHydro_Tmunu.F90 from 6836 to 6241 bytes on my system. I have not attempted to measure a performance difference. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4763 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rw-r--r--lib/make/force-rebuild1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/make/force-rebuild b/lib/make/force-rebuild
index 9c0475b5..d4247101 100644
--- a/lib/make/force-rebuild
+++ b/lib/make/force-rebuild
@@ -35,3 +35,4 @@
08 Apr 2008: Add IF clause to scheduler
23 Dec 2010: Rename cctki_Capabilities.h to cctk_Capabilities.h
20 Jan 2011: Generate prototypes for scheduled functions
+27 Oct 2011: Optimize CCTK_ARGUMENTS for grid functions in Fortran