aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 17:40:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 17:40:00 +0000
commitf98a1ecf0ca52c1cc5ceb07d6a0f35ef73baae4a (patch)
tree75fe0c7741cefcd7dcfaa72a4a894dbdc1ffafc7 /Carpet/CarpetLib/src/interpolate_3d_3tl.cc
parente0f5481d8e5d16afc1431f7a4376828636d6c8af (diff)
CarpetLib: Clean up transport operators
Remove unused, #ifdef'ed out code from the operators. Since the operators use now the bbox class, this checking is already performed there. Remove unused debugging code in the cell-centered operators. Use the restrict qualifier in the prototypes. darcs-hash:20070204174027-dae7b-743583b30d52646219411c98ad99486d10445e52.gz
Diffstat (limited to 'Carpet/CarpetLib/src/interpolate_3d_3tl.cc')
-rw-r--r--Carpet/CarpetLib/src/interpolate_3d_3tl.cc60
1 files changed, 15 insertions, 45 deletions
diff --git a/Carpet/CarpetLib/src/interpolate_3d_3tl.cc b/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
index 04d0e1e94..3b092a1ac 100644
--- a/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
+++ b/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
@@ -34,28 +34,18 @@ namespace CarpetLib {
CCTK_REAL const t2,
T const * restrict const src3,
CCTK_REAL const t3,
- ivect3 const & srcext,
+ ivect3 const & restrict srcext,
T * restrict const dst,
CCTK_REAL const t,
- ivect3 const & dstext,
- ibbox3 const & srcbbox,
- ibbox3 const & dstbbox,
- ibbox3 const & regbbox)
+ ivect3 const & restrict dstext,
+ ibbox3 const & restrict srcbbox,
+ ibbox3 const & restrict dstbbox,
+ ibbox3 const & restrict regbbox)
{
typedef typename typeprops<T>::real RT;
-#if 0
- // This is already guaranteed by bbox
- if (any (srcbbox.stride() == 0 or
- dstbbox.stride() == 0 or
- regbbox.stride() == 0))
- {
- CCTK_WARN (0, "Internal error: stride is zero");
- }
-#endif
-
if (any (srcbbox.stride() != regbbox.stride() or
dstbbox.stride() != regbbox.stride()))
{
@@ -66,32 +56,12 @@ namespace CarpetLib {
CCTK_WARN (0, "Internal error: strides disagree");
}
-#if 0
- // This needs to be allowed for cell centring
- if (any (srcbbox.lower() % srcbbox.stride() != 0 or
- dstbbox.lower() % dstbbox.stride() != 0 or
- regbbox.lower() % regbbox.stride() != 0))
- {
- CCTK_WARN (0, "Internal error: array origins are not integer multiples of the strides");
- }
-#endif
-
// This could be handled, but is likely to point to an error
// elsewhere
if (regbbox.empty()) {
CCTK_WARN (0, "Internal error: region extent is empty");
}
-#if 0
- // This is already guaranteed by bbox
- if (any ((srcbbox.upper() - srcbbox.lower()) % srcbbox.stride() != 0 or
- (dstbbox.upper() - dstbbox.lower()) % dstbbox.stride() != 0 or
- (regbbox.upper() - regbbox.lower()) % regbbox.stride() != 0))
- {
- CCTK_WARN (0, "Internal error: array extents are not integer multiples of the strides");
- }
-#endif
-
if (not regbbox.is_contained_in(srcbbox) or
not regbbox.is_contained_in(dstbbox))
{
@@ -179,13 +149,13 @@ namespace CarpetLib {
CCTK_REAL const t2,
CCTK_REAL const * restrict const src3,
CCTK_REAL const t3,
- ivect3 const & srcext,
+ ivect3 const & restrict srcext,
CCTK_REAL * restrict const dst,
CCTK_REAL const t,
- ivect3 const & dstext,
- ibbox3 const & srcbbox,
- ibbox3 const & dstbbox,
- ibbox3 const & regbbox);
+ ivect3 const & restrict dstext,
+ ibbox3 const & restrict srcbbox,
+ ibbox3 const & restrict dstbbox,
+ ibbox3 const & restrict regbbox);
template
void
@@ -195,13 +165,13 @@ namespace CarpetLib {
CCTK_REAL const t2,
CCTK_COMPLEX const * restrict const src3,
CCTK_REAL const t3,
- ivect3 const & srcext,
+ ivect3 const & restrict srcext,
CCTK_COMPLEX * restrict const dst,
CCTK_REAL const t,
- ivect3 const & dstext,
- ibbox3 const & srcbbox,
- ibbox3 const & dstbbox,
- ibbox3 const & regbbox);
+ ivect3 const & restrict dstext,
+ ibbox3 const & restrict srcbbox,
+ ibbox3 const & restrict dstbbox,
+ ibbox3 const & restrict regbbox);