#1285 Moved reshape, vec to generic_matrix_tools.hpp