Switched matrix_sum and vector_sum to macros.