Small correctness fixes#214
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52e7576052
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| static_cast<long long int>(range.first)) + 1ULL; | ||
| const int rndVal = | ||
| static_cast<int>(static_cast<long long int>(range.first) + | ||
| static_cast<long long int>(_random(width))); |
There was a problem hiding this comment.
Handle large uniform_int ranges inclusively
When the inclusive width is larger than 2^31 but not larger than UINT_MAX (for example gecode_on_restart_uniform_int(-2147483648, 0, y)), this call still cannot draw the last offset. The Rnd unsigned-long-long path delegates to the 32-bit generator for n <= UINT_MAX, and that generator's maximum result for these bounds is n - 2, so range.second remains unreachable even though the predicate is documented as inclusive.
Useful? React with 👍 / 👎.
This branch ports three small fixes from older PRs (#150, #203, and #207) onto the current main branch.
It fixes FlatZinc on_restart uniform value generation so the upper endpoint is included, avoids rewriting the generated CMake config.hpp when its contents have not changed, and sends CPProfiler’s DONE message before disconnecting. Each change is kept as its own commit, with changelog attribution to the original contributor.