All frequently called matrix_functions now inline-ed