Update util.hpp/cpp: add macro for input size