summaryrefslogtreecommitdiff
path: root/src/main/DebugDefines.c
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-19 21:39:52 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-19 21:39:52 +0000
commite44d81f5cbbf756904b98e07688e76bdadbd1437 (patch)
treec1d5a077a664537810319be312744968f00c51a1 /src/main/DebugDefines.c
parent974ed2bedc78ab300f90ecbabdd0ac9c1fcf0589 (diff)
Use inline functions instead of #defines for CCTK_GFINDEX?D if available
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3536 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/DebugDefines.c')
-rw-r--r--src/main/DebugDefines.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/main/DebugDefines.c b/src/main/DebugDefines.c
index c3cbb081..43383489 100644
--- a/src/main/DebugDefines.c
+++ b/src/main/DebugDefines.c
@@ -10,6 +10,7 @@
#include "cctk_Config.h"
#include "cctk_Flesh.h"
+#include "cctk_DebugDefines.h"
static const char *rcsid = "$Header$";
@@ -19,15 +20,9 @@ CCTK_FILEVERSION(main_DebugDefines_c);
/********************************************************************
********************* External Routines **********************
********************************************************************/
-#ifdef CCTK_DEBUG
-int CCTK_GFINDEX1D (const cGH *GH, int i);
-int CCTK_GFINDEX2D (const cGH *GH, int i, int j);
-int CCTK_GFINDEX3D (const cGH *GH, int i, int j, int k);
-int CCTK_GFINDEX4D (const cGH *GH, int i, int j, int k, int l);
-
/*@@
- @routine CCTK_GFINDEX?D
+ @routine CCTK_GFIndex?D
@date Tue 2 Jul 2001
@author Thomas Radke
@desc
@@ -51,25 +46,23 @@ int CCTK_GFINDEX4D (const cGH *GH, int i, int j, int k, int l);
the linear index for the given spatial indices
@endreturndesc
@@*/
-int CCTK_GFINDEX1D (const cGH *GH, int i)
+int CCTK_GFIndex1D (const cGH *GH, int i)
{
GH = GH;
return (i);
}
-int CCTK_GFINDEX2D (const cGH *GH, int i, int j)
+int CCTK_GFIndex2D (const cGH *GH, int i, int j)
{
return (i + GH->cctk_lsh[0]*j);
}
-int CCTK_GFINDEX3D (const cGH *GH, int i, int j, int k)
+int CCTK_GFIndex3D (const cGH *GH, int i, int j, int k)
{
return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*k));
}
-int CCTK_GFINDEX4D (const cGH *GH, int i, int j, int k, int l)
+int CCTK_GFIndex4D (const cGH *GH, int i, int j, int k, int l)
{
return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2] * l)));
}
-
-#endif /* CCTK_DEBUG */