[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Bounds check only if POOMA_BOUNDS_CHECK
From: |
Richard Guenther |
Subject: |
[PATCH] Bounds check only if POOMA_BOUNDS_CHECK |
Date: |
Thu, 19 Aug 2004 23:17:23 +0200 |
User-agent: |
Mozilla Thunderbird 0.7.3 (X11/20040806) |
This patch disables GuardLayers boundschecking if not configured with
bounds checking on.
Ok?
Richard.
2004Aug19 Richard Guenther <address@hidden>
* src/Layout/GuardLayers.h: disable bounds-checking if not
POOMA_BOUNDS_CHECK.
Index: src/Layout/GuardLayers.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Layout/GuardLayers.h,v
retrieving revision 1.10
diff -u -u -r1.10 GuardLayers.h
--- src/Layout/GuardLayers.h 26 Oct 2003 11:28:11 -0000 1.10
+++ src/Layout/GuardLayers.h 19 Aug 2004 21:15:39 -0000
@@ -123,12 +123,16 @@
int lower(int i) const
{
+#if POOMA_BOUNDS_CHECK
PInsist(i<Dim&&i>=0," GuardLayers index out of range ");
+#endif
return lower_m[i];
}
int upper(int i) const
{
+#if POOMA_BOUNDS_CHECK
PInsist(i<Dim&&i>=0," GuardLayers index out of range ");
+#endif
return upper_m[i];
}
@@ -138,12 +142,16 @@
int &lower(int i)
{
+#if POOMA_BOUNDS_CHECK
PInsist(i<Dim&&i>=0," GuardLayers index out of range ");
+#endif
return lower_m[i];
}
int &upper(int i)
{
+#if POOMA_BOUNDS_CHECK
PInsist(i<Dim&&i>=0," GuardLayers index out of range ");
+#endif
return upper_m[i];
}
- [PATCH] Bounds check only if POOMA_BOUNDS_CHECK,
Richard Guenther <=