sampling : simplify clone
This commit is contained in:
parent
1b1b2cbe0e
commit
15ade86a75
|
|
@ -498,9 +498,7 @@ struct llama_dist_rng_mt19937 : llama_dist_rng {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<llama_dist_rng> clone() const override {
|
std::unique_ptr<llama_dist_rng> clone() const override {
|
||||||
auto c = std::make_unique<llama_dist_rng_mt19937>(0);
|
return std::make_unique<llama_dist_rng_mt19937>(*this);
|
||||||
c->rng = rng;
|
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -527,9 +525,7 @@ struct llama_dist_rng_blue : llama_dist_rng {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<llama_dist_rng> clone() const override {
|
std::unique_ptr<llama_dist_rng> clone() const override {
|
||||||
auto c = std::make_unique<llama_dist_rng_blue>(0);
|
return std::make_unique<llama_dist_rng_blue>(*this);
|
||||||
c->bn_rng = bn_rng;
|
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue