Skip to content

Commit

Permalink
fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Jan 31, 2024
1 parent cfdc259 commit 5893dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void Random::prop_sample_bucket(
// all probabilities are the same
if (heavy == n) {
for (auto i = 0; i < size; ++i) {
*result = (*rng)(n);
*result = (*rng)((uint64_t)n);
++result;
}
return;
Expand Down Expand Up @@ -122,7 +122,7 @@ void Random::prop_sample_bucket(

// sample
for (auto i = 0; i < size; ++i) {
size_t bucket = (*rng)(n);
size_t bucket = (*rng)((uint64_t)n);
double acceptance = dqrng::uniform01((*rng)());
*result = (acceptance < dividing_probs[bucket]) ? bucket :
alternative_index[bucket];
Expand Down

0 comments on commit 5893dc3

Please sign in to comment.