Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix on execute #46

Merged
merged 2 commits into from
Nov 13, 2024
Merged

bug fix on execute #46

merged 2 commits into from
Nov 13, 2024

Conversation

JslYoon
Copy link
Contributor

@JslYoon JslYoon commented Oct 31, 2024

There was a problem where the read and write were executed only at the lowest and highest values.

  • fixed the problem by creating a uniform random generator where the range is from 1 to the number of keys.

@JslYoon JslYoon self-assigned this Oct 31, 2024
Copy link
Collaborator

@ephoris ephoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after change. 👍

spdlog::trace("Executing Inserts");
std::mt19937 gen(seed);
std::uniform_int_distribution<value_type> dist(0, 1);
auto num_keys = std::distance(start, end);
std::uniform_int_distribution<value_type> dist(0, num_keys - 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably change this from value_type to size_t as value_type is not guaranteed to be a numeric type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated!

Copy link
Collaborator

@ramananeesh ramananeesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JslYoon JslYoon merged commit ddfa941 into main Nov 13, 2024
1 check passed
@JslYoon JslYoon deleted the jslyoon/bugfix-execute branch November 13, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants