added cumulative_sum_test for fvar/matrix