Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
Browse files Browse the repository at this point in the history
…4.1 (tags/RELEASE_600/final)
  • Loading branch information
stan-buildbot committed Mar 24, 2021
1 parent 9056101 commit 5c7b0bd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/stan/services/util/run_adaptive_sampler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,18 @@ void run_adaptive_sampler(std::vector<Sampler>& samplers, Model& model,
std::vector<DiagnoseT>& diagnostic_writers,
size_t n_chain) {
if (n_chain == 0) {
run_adaptive_sampler(samplers[0], model, cont_vectors[0], num_warmup, num_samples,
num_thin, refresh, save_warmup, rngs[0], interrupt, logger, sample_writers[0],
diagnostic_writers[0]);
run_adaptive_sampler(samplers[0], model, cont_vectors[0], num_warmup,
num_samples, num_thin, refresh, save_warmup, rngs[0],
interrupt, logger, sample_writers[0],
diagnostic_writers[0]);
}
std::vector<stan::mcmc::sample> samples;
samples.reserve(n_chain);
for (int i = 0; i < n_chain; ++i) {
auto&& sampler = samplers[i];
sampler.engage_adaptation();
Eigen::Map<Eigen::VectorXd> cont_params(cont_vectors[i].data(),
cont_vectors[i].size());
cont_vectors[i].size());
try {
sampler.z().q = cont_params;
sampler.init_stepsize(logger);
Expand All @@ -125,12 +126,12 @@ void run_adaptive_sampler(std::vector<Sampler>& samplers, Model& model,
tbb::parallel_for(
tbb::blocked_range<size_t>(0, n_chain, 1),
[num_warmup, num_samples, num_thin, refresh, save_warmup, &samples,
&samplers, &model,
&rngs, &interrupt, &logger, &sample_writers,
&samplers, &model, &rngs, &interrupt, &logger, &sample_writers,
&diagnostic_writers](const tbb::blocked_range<size_t>& r) {
for (size_t i = r.begin(); i != r.end(); ++i) {
auto&& sample_writer = sample_writers[i];
auto writer = services::util::mcmc_writer(sample_writer, diagnostic_writers[i], logger);
auto writer = services::util::mcmc_writer(
sample_writer, diagnostic_writers[i], logger);
auto&& sampler = samplers[i];
auto&& samp = samples[i];

Expand Down

0 comments on commit 5c7b0bd

Please sign in to comment.