@@ -21,8 +21,8 @@ struct count_lpdf {
2121 count_lpdf () {}
2222
2323 // does the reduction in the sub-slice start to end
24- inline T operator ()(std::size_t start , std::size_t end ,
25- const std::vector< int >& sub_slice , std::ostream* msgs,
24+ inline T operator ()(const std::vector< int >& sub_slice , std::size_t start ,
25+ std::size_t end , std::ostream* msgs,
2626 const std::vector<T>& lambda,
2727 const std::vector<int >& idata) const {
2828 return stan::math::poisson_lpmf (sub_slice, lambda[0 ]);
@@ -34,8 +34,8 @@ struct nesting_count_lpdf {
3434 nesting_count_lpdf () {}
3535
3636 // does the reduction in the sub-slice start to end
37- inline T operator ()(std::size_t start , std::size_t end ,
38- const std::vector< int >& sub_slice , std::ostream* msgs,
37+ inline T operator ()(const std::vector< int >& sub_slice , std::size_t start ,
38+ std::size_t end , std::ostream* msgs,
3939 const std::vector<T>& lambda,
4040 const std::vector<int >& idata) const {
4141 return stan::math::reduce_sum<count_lpdf<T>>(sub_slice, 5 , msgs, lambda,
@@ -64,7 +64,7 @@ struct sum_lpdf {
6464 }
6565
6666 template <typename T, typename ... Args>
67- inline auto operator ()(std::size_t start, std::size_t end, T&& sub_slice ,
67+ inline auto operator ()(T&& sub_slice, std::size_t start, std::size_t end,
6868 std::ostream* msgs, Args&&... args) const {
6969 using return_type = stan::return_type_t <T, Args...>;
7070
@@ -77,7 +77,7 @@ struct sum_lpdf {
7777
7878struct start_end_lpdf {
7979 template <typename T1, typename T2>
80- inline auto operator ()(std::size_t start, std::size_t end, T1&& ,
80+ inline auto operator ()(T1&&, std::size_t start, std::size_t end,
8181 std::ostream* msgs, T2&& data) const {
8282 stan::return_type_t <T1, T2> sum = 0 ;
8383 EXPECT_GE (start, 0 );
@@ -97,8 +97,8 @@ struct slice_group_count_lpdf {
9797 slice_group_count_lpdf () {}
9898
9999 // does the reduction in the sub-slice start to end
100- inline T operator ()(std::size_t start , std::size_t end ,
101- const std::vector<T>& lambda_slice , std::ostream* msgs,
100+ inline T operator ()(const std::vector<T>& lambda_slice , std::size_t start ,
101+ std::size_t end , std::ostream* msgs,
102102 const std::vector<int >& y,
103103 const std::vector<int >& gsidx) const {
104104 const std::size_t num_groups = end - start + 1 ;
@@ -121,7 +121,7 @@ struct grouped_count_lpdf {
121121
122122 // does the reduction in the sub-slice start to end
123123 template <typename VecInt1, typename VecT, typename VecInt2>
124- inline T operator ()(std::size_t start, std::size_t end, VecInt1&& sub_slice ,
124+ inline T operator ()(VecInt1&& sub_slice, std::size_t start, std::size_t end,
125125 std::ostream* msgs, VecT&& lambda, VecInt2&& gidx) const {
126126 const std::size_t num_terms = end - start + 1 ;
127127 std::decay_t <VecT> lambda_slice (num_terms);
@@ -168,8 +168,8 @@ auto reduce_sum_sum_lpdf = [](auto&& data, auto&&... args) {
168168template <int grainsize>
169169struct static_check_lpdf {
170170 template <typename T>
171- inline auto operator ()(std::size_t start , std::size_t end ,
172- const std::vector< int >& , std::ostream* msgs,
171+ inline auto operator ()(const std::vector< int >& , std::size_t start ,
172+ std::size_t end , std::ostream* msgs,
173173 const std::vector<T>& data) const {
174174 T sum = 0 ;
175175 EXPECT_LE (end - start + 1 , grainsize);
0 commit comments