sampling : simplify clone

This commit is contained in:
Jan Boon 2026-02-07 04:49:37 +00:00
parent 1b1b2cbe0e
commit 15ade86a75
1 changed files with 2 additions and 6 deletions

View File

@ -498,9 +498,7 @@ struct llama_dist_rng_mt19937 : llama_dist_rng {
}
std::unique_ptr<llama_dist_rng> clone() const override {
auto c = std::make_unique<llama_dist_rng_mt19937>(0);
c->rng = rng;
return c;
return std::make_unique<llama_dist_rng_mt19937>(*this);
}
};
@ -527,9 +525,7 @@ struct llama_dist_rng_blue : llama_dist_rng {
}
std::unique_ptr<llama_dist_rng> clone() const override {
auto c = std::make_unique<llama_dist_rng_blue>(0);
c->bn_rng = bn_rng;
return c;
return std::make_unique<llama_dist_rng_blue>(*this);
}
};