aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2002-11-06 13:55:24 +0000
committerschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2002-11-06 13:55:24 +0000
commit934c58a18098245b57324649e0e5606e64f2c589 (patch)
tree422fb847639580fee212aba40d635d11f3cd3d3b /src
parent5a0eefdbf5807d4bf95b3dc2bfb3e0f0e7abcfe3 (diff)
Added thorn documentation.
Added option table argument. Added copyright statement. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@9 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
Diffstat (limited to 'src')
-rw-r--r--src/slab.c17
-rw-r--r--src/slab.h29
2 files changed, 19 insertions, 27 deletions
diff --git a/src/slab.c b/src/slab.c
index 53bcabf..99663eb 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -2,12 +2,13 @@
/*
TODO:
+ Provide facilities for types other than CCTK_REAL
Provide facilities for dim != 3
Set up the slab exchange information in advance
Test slabbing without MPI
Allow using / not setting the ghost zones
Allow not using / not setting the boundaries
- Allow different ghost zones at the lower and upper boundary
+ Allow different numbers of ghost zones at the lower and upper boundary
*/
@@ -195,16 +196,6 @@ struct info {
-static inline int min (int const x, int const y)
-{
- return x < y ? x : y;
-}
-
-static inline int max (int const x, int const y)
-{
- return x > y ? x : y;
-}
-
static inline int roundup (int const x, int const y)
{
assert (x >= 0);
@@ -363,7 +354,8 @@ static void bbox_xform (struct bbox * restrict const ydst,
int Slab_Transfer (cGH * restrict const cctkGH,
int const dim,
- struct xferinfo const * const xferinfo,
+ struct xferinfo const * restrict const xferinfo,
+ int const options,
int const srctype,
void const * const srcptr,
int const dsttype,
@@ -663,7 +655,6 @@ int Slab_Transfer (cGH * restrict const cctkGH,
&& srcipos[c] < info[c].src.local.off + info[c].src.local.len);
if (! (srcipos[c] >= allinfo[n*dim+c].src.slab.off
&& srcipos[c] <= allinfo[n*dim+c].src.slab.off + (allinfo[n*dim+c].src.slab.len - 1) * allinfo[n*dim+c].src.slab.str)) {
- printf ("ssc n=%d ipos=[%d,%d,%d] d=%d srcipos=%d slab.off=%d slab.len=%d\n", n, i, j, k, d, srcipos[c], allinfo[n*dim+c].src.slab.off, allinfo[n*dim+c].src.slab.len);
}
assert (srcipos[c] >= allinfo[n*dim+c].src.slab.off
&& srcipos[c] <= allinfo[n*dim+c].src.slab.off + (allinfo[n*dim+c].src.slab.len - 1) * allinfo[n*dim+c].src.slab.str);
diff --git a/src/slab.h b/src/slab.h
index b79af0a..2aa32bc 100644
--- a/src/slab.h
+++ b/src/slab.h
@@ -5,19 +5,6 @@
#include "cctk.h"
-struct slabinfo {
- int gsh;
- int lbnd, lsh;
- int lbbox, ubbox, nghostzones;
- int off, str, len;
-};
-
-struct xferinfo {
- struct slabinfo src, dst;
- int xpose;
- int flip;
-};
-
/*
Slab_Transfer copies a slab from one array into a slab of another
array.
@@ -83,9 +70,23 @@ struct xferinfo {
The source and the destination arrays may be the same.
*/
+struct slabinfo {
+ int gsh;
+ int lbnd, lsh;
+ int lbbox, ubbox, nghostzones;
+ int off, str, len;
+};
+
+struct xferinfo {
+ struct slabinfo src, dst;
+ int xpose;
+ int flip;
+};
+
int Slab_Transfer (cGH * restrict const cctkGH,
int const dim,
- struct xferinfo const * const xferinfo,
+ struct xferinfo const * restrict const xferinfo,
+ int const options,
int const srctype,
void const * const srcptr,
int const dsttype,