Skip to content

Commit

Permalink
Fix BinarySearchBin() argument types (#7026)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpboudreau committed Jun 8, 2021
1 parent 7beb2f7 commit bd2ca54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/hist_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ struct GHistIndexMatrix {
};

template <typename GradientIndex>
int32_t XGBOOST_HOST_DEV_INLINE BinarySearchBin(bst_uint begin, bst_uint end,
int32_t XGBOOST_HOST_DEV_INLINE BinarySearchBin(size_t begin, size_t end,
GradientIndex const &data,
uint32_t const fidx_begin,
uint32_t const fidx_end) {
uint32_t previous_middle = std::numeric_limits<uint32_t>::max();
size_t previous_middle = std::numeric_limits<size_t>::max();
while (end != begin) {
auto middle = begin + (end - begin) / 2;
size_t middle = begin + (end - begin) / 2;
if (middle == previous_middle) {
break;
}
Expand Down

0 comments on commit bd2ca54

Please sign in to comment.