Merge branch 'master' into sync-2024Jan24
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright 2023 by XGBoost Contributors
|
||||
* Copyright 2023-2024 by XGBoost Contributors
|
||||
*/
|
||||
#ifndef XGBOOST_TREE_HIST_HIST_CACHE_H_
|
||||
#define XGBOOST_TREE_HIST_HIST_CACHE_H_
|
||||
@@ -48,11 +48,13 @@ class BoundedHistCollection {
|
||||
BoundedHistCollection() = default;
|
||||
common::GHistRow operator[](std::size_t idx) {
|
||||
auto offset = node_map_.at(idx);
|
||||
return common::Span{data_->data(), data_->size()}.subspan(offset, n_total_bins_);
|
||||
return common::Span{data_->data(), static_cast<size_t>(data_->size())}.subspan(
|
||||
offset, n_total_bins_);
|
||||
}
|
||||
common::ConstGHistRow operator[](std::size_t idx) const {
|
||||
auto offset = node_map_.at(idx);
|
||||
return common::Span{data_->data(), data_->size()}.subspan(offset, n_total_bins_);
|
||||
return common::Span{data_->data(), static_cast<size_t>(data_->size())}.subspan(
|
||||
offset, n_total_bins_);
|
||||
}
|
||||
void Reset(bst_bin_t n_total_bins, std::size_t n_cached_nodes) {
|
||||
n_total_bins_ = n_total_bins;
|
||||
|
||||
Reference in New Issue
Block a user