diff options
author | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2003-03-17 10:31:02 +0000 |
---|---|---|
committer | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2003-03-17 10:31:02 +0000 |
commit | b0c30dd9a98d70670bf2685164256c44a84e8fc1 (patch) | |
tree | 51d2cc87c92dc300ce5730b0134ca957f531310c | |
parent | 56997204ccf8e623f6a147a3325c55476448663f (diff) |
Disable the assert statements in the inner loop by default.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@19 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r-- | src/slab.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1017,13 +1017,13 @@ int Slab_Transfer (cGH const * restrict const cctkGH, } else { bufipos[d] = dstdetail[n*SLAB_MAXDIM+d].len - 1 - ipos[d]; } - assert (bufipos[d] >= 0 && bufipos[d] < dstdetail[n*SLAB_MAXDIM+d].len); + ifcheck assert (bufipos[d] >= 0 && bufipos[d] < dstdetail[n*SLAB_MAXDIM+d].len); dstipos[d] = dstdetail[n*SLAB_MAXDIM+d].off + ipos[d] * info[d].dst.slab.str; - assert (dstipos[d] >= info[d].dst.local.off - && dstipos[d] < info[d].dst.local.off + info[d].dst.local.len); - assert (dstipos[d] >= info[d].dst.slab.off - && dstipos[d] <= info[d].dst.slab.off + (info[d].dst.slab.len - 1) * info[d].dst.slab.str); - assert ((dstipos[d] - info[d].dst.slab.off) % info[d].dst.slab.str == 0); + ifcheck assert (dstipos[d] >= info[d].dst.local.off + && dstipos[d] < info[d].dst.local.off + info[d].dst.local.len); + ifcheck assert (dstipos[d] >= info[d].dst.slab.off + && dstipos[d] <= info[d].dst.slab.off + (info[d].dst.slab.len - 1) * info[d].dst.slab.str); + ifcheck assert ((dstipos[d] - info[d].dst.slab.off) % info[d].dst.slab.str == 0); } bufind = 0; dstind = 0; @@ -1031,8 +1031,8 @@ int Slab_Transfer (cGH const * restrict const cctkGH, bufind = bufind * dstdetail[n*SLAB_MAXDIM+d].len + bufipos[d]; dstind = dstind * info[d].dst.local.len + dstipos[d] - info[d].dst.local.off; } - assert (bufind < (size_t)dstcount[n]); - assert (dstind < dstlentot); + ifcheck assert (bufind < (size_t)dstcount[n]); + ifcheck assert (dstind < dstlentot); /* ((CCTK_REAL*)dstptr)[dstind] */ /* = ((const CCTK_REAL*)dstdata)[dstoffset[n] + bufind]; */ memcpy ((char *) dstptr + dsttypesize * dstind, |