@@ -170,10 +170,11 @@ function mcmcsample(
170
170
171
171
@withprogresslogger begin
172
172
init_progress (progress)
173
- # Determine threshold values for progress logging
174
- # (one update per 0.5% of progress)
173
+ # Determine threshold values for progress logging (by default, one
174
+ # update per 0.5% of progress, unless this has been passed in
175
+ # explicitly)
175
176
n_updates = progress isa ChannelProgress ? progress. n_updates : 200
176
- threshold = Ntotal ÷ n_updates
177
+ threshold = Ntotal / n_updates
177
178
next_update = threshold
178
179
179
180
# Obtain the initial sample and state.
@@ -195,7 +196,7 @@ function mcmcsample(
195
196
itotal = 1
196
197
if itotal >= next_update
197
198
update_progress (progress, itotal / Ntotal)
198
- next_update = itotal + threshold
199
+ next_update += threshold
199
200
end
200
201
201
202
# Discard initial samples.
@@ -211,7 +212,7 @@ function mcmcsample(
211
212
itotal += 1
212
213
if itotal >= next_update
213
214
update_progress (progress, itotal / Ntotal)
214
- next_update = itotal + threshold
215
+ next_update += threshold
215
216
end
216
217
end
217
218
@@ -237,7 +238,7 @@ function mcmcsample(
237
238
itotal += 1
238
239
if itotal >= next_update
239
240
update_progress (progress, itotal / Ntotal)
240
- next_update = itotal + threshold
241
+ next_update += threshold
241
242
end
242
243
end
243
244
@@ -259,7 +260,7 @@ function mcmcsample(
259
260
itotal += 1
260
261
if itotal >= next_update
261
262
update_progress (progress, itotal / Ntotal)
262
- next_update = itotal + threshold
263
+ next_update += threshold
263
264
end
264
265
end
265
266
finish_progress (progress)
@@ -510,15 +511,15 @@ function mcmcsample(
510
511
Ntotal = progress == :overall ? nchains * updates_per_chain : nchains
511
512
# Determine threshold values for progress logging
512
513
# (one update per 0.5% of progress)
513
- threshold = Ntotal ÷ 200
514
+ threshold = Ntotal / 200
514
515
next_update = threshold
515
516
516
517
itotal = 0
517
518
while take! (progress_channel)
518
519
itotal += 1
519
520
if itotal >= next_update
520
521
update_progress (overall_progress_bar, itotal / Ntotal)
521
- next_update = itotal + threshold
522
+ next_update += threshold
522
523
end
523
524
end
524
525
finish_progress (overall_progress_bar)
@@ -686,15 +687,15 @@ function mcmcsample(
686
687
# Determine threshold values for progress logging
687
688
# (one update per 0.5% of progress)
688
689
Ntotal = nchains * updates_per_chain
689
- threshold = Ntotal ÷ 200
690
+ threshold = Ntotal / 200
690
691
next_update = threshold
691
692
692
693
itotal = 0
693
694
while take! (progress_channel)
694
695
itotal += 1
695
696
if itotal >= next_update
696
697
update_progress (overall_progress_bar, itotal / Ntotal)
697
- next_update = itotal + threshold
698
+ next_update += threshold
698
699
end
699
700
end
700
701
finish_progress (overall_progress_bar)
0 commit comments