inline typename boost::math::tools::promote_args<T_lp, T_lp_accum>::type get_lp(const T_lp& lp, const stan::math::accumulator<T_lp_accum>& lp_accum) { return lp + lp_accum.sum(); }
// test sum of first n numbers for sum of a void test_sum(stan::math::accumulator<stan::math::var>& a, int n) { EXPECT_FLOAT_EQ((n * (n + 1)) / 2, a.sum().val()); }
void test_sum(stan::math::accumulator<T>& a, int n) { EXPECT_TRUE((n * (n + 1)) / 2 == a.sum()); }