From bd2ca543c44e6a5614632065edf2bf1bf526131f Mon Sep 17 00:00:00 2001 From: TP Boudreau Date: Tue, 8 Jun 2021 04:05:46 -0700 Subject: [PATCH] Fix BinarySearchBin() argument types (#7026) --- src/common/hist_util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/hist_util.h b/src/common/hist_util.h index 75cbe14d0..62a1db956 100644 --- a/src/common/hist_util.h +++ b/src/common/hist_util.h @@ -295,13 +295,13 @@ struct GHistIndexMatrix { }; template -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::max(); + size_t previous_middle = std::numeric_limits::max(); while (end != begin) { - auto middle = begin + (end - begin) / 2; + size_t middle = begin + (end - begin) / 2; if (middle == previous_middle) { break; }