summaryrefslogtreecommitdiff
path: root/doc
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 /doc
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 'doc')
0 files changed, 0 insertions, 0 deletions