/*! * Copyright 2020-2021 by XGBoost Contributors */ #ifndef HISTOGRAM_CUH_ #define HISTOGRAM_CUH_ #include #include "feature_groups.cuh" #include "../../data/ellpack_page.cuh" namespace xgboost { namespace tree { template GradientSumT CreateRoundingFactor(common::Span gpair); template XGBOOST_DEV_INLINE T TruncateWithRoundingFactor(T const rounding_factor, U const x) { static_assert(sizeof(T) >= sizeof(U), "Rounding must have higher or equal precision."); return (rounding_factor + static_cast(x)) - rounding_factor; } template void BuildGradientHistogram(EllpackDeviceAccessor const& matrix, FeatureGroupsAccessor const& feature_groups, common::Span gpair, common::Span ridx, common::Span histogram, GradientSumT rounding); } // namespace tree } // namespace xgboost #endif // HISTOGRAM_CUH_