aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/interpolate_3d_5tl.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2011-02-05 19:28:29 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 18:25:59 +0000
commit26093c56ff1577a37ae8137ef8f8a1b6bb7ed671 (patch)
tree10685143b432dc563e7ba8da0b968b0a32fa1835 /Carpet/CarpetLib/src/interpolate_3d_5tl.cc
parent6fe0b030331413db6a403dfd7b66c0855ea202ba (diff)
CarpetLib: Introduce gdata::allocated_memory_shape
Introduce a function gdata::allocated_memory_shape that determines from a given grid size how many grid points should be allocated. This allows adding padding to grid sizes, e.g. to improve cache performance. Use this function when checking grid sizes.
Diffstat (limited to 'Carpet/CarpetLib/src/interpolate_3d_5tl.cc')
-rw-r--r--Carpet/CarpetLib/src/interpolate_3d_5tl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/interpolate_3d_5tl.cc b/Carpet/CarpetLib/src/interpolate_3d_5tl.cc
index 431351b37..2cb033f37 100644
--- a/Carpet/CarpetLib/src/interpolate_3d_5tl.cc
+++ b/Carpet/CarpetLib/src/interpolate_3d_5tl.cc
@@ -8,6 +8,7 @@
#include <loopcontrol.h>
+#include "gdata.hh"
#include "operator_prototypes_3d.hh"
#include "typeprops.hh"
@@ -74,8 +75,8 @@ namespace CarpetLib {
CCTK_WARN (0, "Internal error: region extent is not contained in array extent");
}
- if (any (srcext != srcbbox.shape() / srcbbox.stride() or
- dstext != dstbbox.shape() / dstbbox.stride()))
+ if (any (srcext != gdata::allocated_memory_shape(srcbbox.shape() / srcbbox.stride()) or
+ dstext != gdata::allocated_memory_shape(dstbbox.shape() / dstbbox.stride())))
{
CCTK_WARN (0, "Internal error: array sizes don't agree with bounding boxes");
}