Is this a good way of providing bounds checking while using __restrict__ keyword in C++
I am writing some C++ compiling with g++, and I use the __restrict__
keyword on pointer arrays in some performance critical places to hopefully getting better performance. However, std::vector's []
operator has the neat ability to provide range checking in debug build if the flag _GLIBCXX_DEBUG
is specified with g++. However I guess the options to get the __restrict__
benefit is lost if using std::vector as a raw pointer must be used with it.