mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 22:35:44 +00:00
better not to bind here
This commit is contained in:
parent
eb6e002d52
commit
bb527dd888
1 changed files with 2 additions and 2 deletions
|
|
@ -35,8 +35,8 @@ void crs_test(int trials)
|
|||
for (int i = 0; i < numbers_total; ++i)
|
||||
numbers[i] = i;
|
||||
for (int i = 0; i < block_count; i++) {
|
||||
auto hat = std::bind(distribution(i, numbers_total - 1), generator);
|
||||
std::swap(numbers[i], numbers[hat()]);
|
||||
std::uniform_int_distribution<int> hat(i, numbers_total - 1);
|
||||
std::swap(numbers[i], numbers[hat(generator)]);
|
||||
}
|
||||
for (int i = 0; i < block_count; ++i)
|
||||
encode(orig, blocks + block_bytes * i, numbers[i], block_bytes, block_count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue