diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-08-12 13:25:50 -0400 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-08-12 13:25:50 -0400 |
| commit | 911eb0ef61dc7d327507c6406120a80797190884 (patch) | |
| tree | f709c793c44f19261ed4cf9d8d53867963cc243e | |
| parent | 7f0acb5dc66cc93045ab0e40ebd5570388f9102b (diff) | |
| download | dynamic-extension-911eb0ef61dc7d327507c6406120a80797190884.tar.gz | |
file_util.h: Swapped from random_shuffle to shuffle
| -rw-r--r-- | benchmarks/include/file_util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/benchmarks/include/file_util.h b/benchmarks/include/file_util.h index 2d340e6..ef7e464 100644 --- a/benchmarks/include/file_util.h +++ b/benchmarks/include/file_util.h @@ -8,6 +8,7 @@ #include <gsl/gsl_rng.h> #include <iostream> #include <memory> +#include <random> #include <sstream> #include <string> #include <type_traits> @@ -214,7 +215,9 @@ static std::vector<R> generate_uniform(size_t n) { records[i].value = i; } - std::random_shuffle(records.begin(), records.end()); + std::random_device rd; + std::mt19937 g(rd()); + std::shuffle(records.begin(), records.end(), g); return records; } |