File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ #pragma GCC optimize("O0")
1
2
#include " driver.hxx"
2
3
3
4
#include " boundaries.hxx"
Original file line number Diff line number Diff line change @@ -251,11 +251,21 @@ struct GHExt {
251
251
int typesize () const { return _typesize; };
252
252
253
253
const void *data_at (size_t i) const {
254
+ #ifdef CCTK_DEBUG
255
+ if (i >= _count) {
256
+ CCTK_VERROR (" invalid index %zd exceeds %zd" , i, _count);
257
+ }
258
+ #endif
254
259
assert (i < _count);
255
260
return (char *)_data + i * _typesize;
256
261
};
257
262
258
263
void *data_at (size_t i) {
264
+ #ifdef CCTK_DEBUG
265
+ if (i >= _count) {
266
+ CCTK_VERROR (" invalid index %zu exceeds %zu" , i, _count);
267
+ }
268
+ #endif
259
269
assert (i < _count);
260
270
return (char *)_data + i * _typesize;
261
271
};
You can’t perform that action at this time.
0 commit comments