Skip to content

Commit 1dbf607

Browse files
committed
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
1 parent 7639a7d commit 1dbf607

3 files changed

Lines changed: 23 additions & 18 deletions

File tree

stan/math/mix/functor/laplace_marginal_density.hpp

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ inline void set_zero_adjoint(Output&& output) {
312312
} else if constexpr (is_stan_scalar_v<output_i_t>) {
313313
output_i.adj() = 0;
314314
} else {
315-
throw std::domain_error("INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
315+
throw std::domain_error(
316+
"INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
316317
"not able to deduce the actions needed for the given type.");
317318
}
318319
},
@@ -355,8 +356,9 @@ inline void collect_adjoints(Output& output, Input&& input) {
355356
input_i.adj() = 0;
356357
}
357358
} else {
358-
throw std::domain_error("INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
359-
"not able to deduce the actions needed for the given type.");
359+
throw std::domain_error(
360+
"INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
361+
"not able to deduce the actions needed for the given type.");
360362
}
361363
},
362364
std::forward<Output>(output), std::forward<Input>(input));
@@ -807,9 +809,9 @@ inline void collect_adjoints(Output&& output, Input&& input) {
807809
} else if constexpr (is_stan_scalar_v<output_i_t>) {
808810
output_i += input_i;
809811
} else {
810-
throw std::domain_error("INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
811-
"not able to deduce the actions needed for the given type.");
812-
812+
throw std::domain_error(
813+
"INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
814+
"not able to deduce the actions needed for the given type.");
813815
}
814816
},
815817
std::forward<Output>(output), std::forward<Input>(input));
@@ -856,8 +858,9 @@ inline void copy_compute_s2(Output&& output, Input&& input) {
856858
input_i.adj() = 0;
857859
}
858860
} else {
859-
throw std::domain_error("INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
860-
"not able to deduce the actions needed for the given type.");
861+
throw std::domain_error(
862+
"INTERNAL ERROR:(laplace_marginal_lpdf) set_zero_adjoints was "
863+
"not able to deduce the actions needed for the given type.");
861864
}
862865
},
863866
std::forward<Output>(output), std::forward<Input>(input));
@@ -913,11 +916,12 @@ inline constexpr auto make_zeroed_arena(Input&& input) {
913916
template <typename Output, typename Input>
914917
inline void collect_adjoints(Output&& output, const vari* ret, Input&& input) {
915918
if constexpr (is_tuple_v<Output>) {
916-
throw std::domain_error("INTERNAL ERROR:(laplace_marginal_lpdf)"
917-
"Accumulate Adjoints called on a tuple, but tuples cannot be "
918-
"on the reverse mode stack!"
919-
"This is an internal error, please report it to the stan "
920-
"github as an issue.");
919+
throw std::domain_error(
920+
"INTERNAL ERROR:(laplace_marginal_lpdf)"
921+
"Accumulate Adjoints called on a tuple, but tuples cannot be "
922+
"on the reverse mode stack!"
923+
"This is an internal error, please report it to the stan "
924+
"github as an issue.");
921925
} else if constexpr (is_std_vector_v<Output>) {
922926
if constexpr (!is_var_v<value_type_t<Output>>) {
923927
const auto output_size = output.size();

stan/math/prim/fun/promote_scalar.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ inline constexpr auto promote_scalar(UnPromotedTypes&& x) {
4545
} else if constexpr (is_stan_scalar_v<UnPromotedTypes>) {
4646
return PromotionScalars(std::forward<UnPromotedTypes>(x));
4747
} else {
48-
throw std::domain_error("promote_scalar: "
49-
"Unrecognized type for promotion");
48+
throw std::domain_error(
49+
"promote_scalar: "
50+
"Unrecognized type for promotion");
5051
}
5152
}
5253

test/unit/math/laplace/laplace_marginal_lpdf_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ struct poisson_log_likelihood_tuple {
4242
struct poisson_log_likelihood_tuple_expanded {
4343
template <typename Theta, typename Eta, typename Eta1, typename Eta2>
4444
auto operator()(const Theta& theta, const std::vector<int>& delta_int,
45-
Eta&& eta, Eta1&& eta1, Eta2&& eta2, std::ostream* pstream) const {
45+
Eta&& eta, Eta1&& eta1, Eta2&& eta2,
46+
std::ostream* pstream) const {
4647
return stan::math::poisson_log_lpmf(delta_int, theta) + std::get<0>(eta)
4748
+ std::get<1>(eta) + stan::math::sum(eta1) + stan::math::sum(eta2);
4849
}
@@ -92,8 +93,7 @@ TEST(laplace, poisson_log_phi_dim_2_tuple_extended) {
9293
poisson_log_likelihood_tuple_expanded{},
9394
std::forward_as_tuple(sums, eta1_tuple, eta2, eta3), theta_0,
9495
stan::math::test::squared_kernel_functor{},
95-
std::forward_as_tuple(
96-
x, std::make_tuple(phi_dbl(0), phi_dbl(1))),
96+
std::forward_as_tuple(x, std::make_tuple(phi_dbl(0), phi_dbl(1))),
9797
tolerance, max_num_steps, hessian_block_size, solver_num,
9898
max_steps_line_search, nullptr);
9999
};

0 commit comments

Comments
 (0)