Thank you for developing an awesome library! It would be useful to be able to toggle extent checking at runtime for testing. We have encountered a couple of rare problems with indices going past their extents but still mapping to a valid flat offset, such as a 2 x 3 x 4 tensor with index (3, 1, 1) in column major ordering that returns a flat offset of
3 + 1 * (2) + 1 * (2 * 3) = 11 (less than 2 * 3 * 4 = 24 so valid)
seems like it would be fairly easy to just add something like this below line 481
#ifdef NDA_BOUND_CHECKING
if (at - min_ >= extent_) {
throw std::runtime_error(...)
}
#endif
to catch these greater than extent errors. Do you think this is reasonable?
Thank you for developing an awesome library! It would be useful to be able to toggle extent checking at runtime for testing. We have encountered a couple of rare problems with indices going past their extents but still mapping to a valid flat offset, such as a 2 x 3 x 4 tensor with index (3, 1, 1) in column major ordering that returns a flat offset of
seems like it would be fairly easy to just add something like this below line 481
to catch these greater than extent errors. Do you think this is reasonable?