Skip to content

Commit

Permalink
move rungibbs inside getspillover
Browse files Browse the repository at this point in the history
  • Loading branch information
ygeunkim committed Jan 19, 2025
1 parent bd9f332 commit eb8d72a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions inst/include/bvharspillover.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ class DynamicLdltSpillover {
model[window][chain].reset();
}
void getSpillover(int window, int chain) {
runGibbs(window, chain);
spillover[window][chain]->computeSpillover();
to_sp[window][chain] = spillover[window][chain]->returnTo();
from_sp[window][chain] = spillover[window][chain]->returnFrom();
Expand All @@ -423,7 +424,6 @@ class DynamicLdltSpillover {
#pragma omp parallel for num_threads(nthreads)
#endif
for (int window = 0; window < num_horizon; ++window) {
runGibbs(window, 0);
getSpillover(window, 0);
}
} else {
Expand All @@ -432,7 +432,6 @@ class DynamicLdltSpillover {
#endif
for (int window = 0; window < num_horizon; ++window) {
for (int chain = 0; chain < num_chains; ++chain) {
runGibbs(window, chain);
getSpillover(window, chain);
}
}
Expand Down

0 comments on commit eb8d72a

Please sign in to comment.