Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-buildbot committed Feb 8, 2024
1 parent ef1da99 commit e4c466c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/stan/services/sample/hmc_nuts_dense_e.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ int hmc_nuts_dense_e(Model& model, const stan::io::var_context& init,
callbacks::writer& init_writer,
callbacks::writer& sample_writer,
callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_dense_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_dense_inv_metric(model.num_params_r());
return hmc_nuts_dense_e(model, init, default_metric, random_seed, chain,
init_radius, num_warmup, num_samples, num_thin,
save_warmup, refresh, stepsize, stepsize_jitter,
Expand Down
6 changes: 4 additions & 2 deletions src/stan/services/sample/hmc_nuts_dense_e_adapt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ int hmc_nuts_dense_e_adapt(
callbacks::logger& logger, callbacks::writer& init_writer,
callbacks::writer& sample_writer, callbacks::writer& diagnostic_writer,
callbacks::structured_writer& metric_writer) {
auto default_metric = util::create_unit_e_dense_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_dense_inv_metric(model.num_params_r());
return hmc_nuts_dense_e_adapt(
model, init, default_metric, random_seed, chain, init_radius, num_warmup,
num_samples, num_thin, save_warmup, refresh, stepsize, stepsize_jitter,
Expand Down Expand Up @@ -257,7 +258,8 @@ int hmc_nuts_dense_e_adapt(
unsigned int window, callbacks::interrupt& interrupt,
callbacks::logger& logger, callbacks::writer& init_writer,
callbacks::writer& sample_writer, callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_dense_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_dense_inv_metric(model.num_params_r());
callbacks::structured_writer dummy_metric_writer;
return hmc_nuts_dense_e_adapt(
model, init, default_metric, random_seed, chain, init_radius, num_warmup,
Expand Down
3 changes: 2 additions & 1 deletion src/stan/services/sample/hmc_nuts_diag_e.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ int hmc_nuts_diag_e(Model& model, const stan::io::var_context& init,
callbacks::writer& init_writer,
callbacks::writer& sample_writer,
callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_diag_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_diag_inv_metric(model.num_params_r());
return hmc_nuts_diag_e(model, init, default_metric, random_seed, chain,
init_radius, num_warmup, num_samples, num_thin,
save_warmup, refresh, stepsize, stepsize_jitter,
Expand Down
3 changes: 2 additions & 1 deletion src/stan/services/sample/hmc_static_dense_e.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ int hmc_static_dense_e(
double stepsize_jitter, double int_time, callbacks::interrupt& interrupt,
callbacks::logger& logger, callbacks::writer& init_writer,
callbacks::writer& sample_writer, callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_dense_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_dense_inv_metric(model.num_params_r());
return hmc_static_dense_e(model, init, default_metric, random_seed, chain,
init_radius, num_warmup, num_samples, num_thin,
save_warmup, refresh, stepsize, stepsize_jitter,
Expand Down
3 changes: 2 additions & 1 deletion src/stan/services/sample/hmc_static_dense_e_adapt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ int hmc_static_dense_e_adapt(
unsigned int window, callbacks::interrupt& interrupt,
callbacks::logger& logger, callbacks::writer& init_writer,
callbacks::writer& sample_writer, callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_dense_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_dense_inv_metric(model.num_params_r());

return hmc_static_dense_e_adapt(
model, init, default_metric, random_seed, chain, init_radius, num_warmup,
Expand Down
3 changes: 2 additions & 1 deletion src/stan/services/sample/hmc_static_diag_e.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ int hmc_static_diag_e(Model& model, const stan::io::var_context& init,
callbacks::logger& logger, callbacks::writer& init_writer,
callbacks::writer& sample_writer,
callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_diag_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_diag_inv_metric(model.num_params_r());

return hmc_static_diag_e(model, init, default_metric, random_seed, chain,
init_radius, num_warmup, num_samples, num_thin,
Expand Down
3 changes: 2 additions & 1 deletion src/stan/services/sample/hmc_static_diag_e_adapt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ int hmc_static_diag_e_adapt(
unsigned int window, callbacks::interrupt& interrupt,
callbacks::logger& logger, callbacks::writer& init_writer,
callbacks::writer& sample_writer, callbacks::writer& diagnostic_writer) {
auto default_metric = util::create_unit_e_diag_inv_metric(model.num_params_r());
auto default_metric
= util::create_unit_e_diag_inv_metric(model.num_params_r());

return hmc_static_diag_e_adapt(
model, init, default_metric, random_seed, chain, init_radius, num_warmup,
Expand Down
6 changes: 4 additions & 2 deletions src/test/unit/services/util/inv_metric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ TEST(inv_metric, create_diag_sz0) {
}

TEST(inv_metric, create_diag_sz100) {
auto default_metric = stan::services::util::create_unit_e_diag_inv_metric(100);
auto default_metric
= stan::services::util::create_unit_e_diag_inv_metric(100);
stan::io::var_context& inv_inv_metric = default_metric;
std::vector<double> diag_vals = inv_inv_metric.vals_r("inv_metric");
EXPECT_EQ(100, diag_vals.size());
Expand Down Expand Up @@ -52,7 +53,8 @@ TEST(inv_metric, create_dense_sz3) {
}

TEST(inv_metric, create_dense_sz10) {
auto default_metric = stan::services::util::create_unit_e_dense_inv_metric(10);
auto default_metric
= stan::services::util::create_unit_e_dense_inv_metric(10);
stan::io::var_context& inv_inv_metric = default_metric;
std::vector<double> dense_vals = inv_inv_metric.vals_r("inv_metric");
EXPECT_EQ(100, dense_vals.size());
Expand Down

0 comments on commit e4c466c

Please sign in to comment.