xgboost
Classes | Namespaces | Typedefs | Enumerations | Functions
hist_util.h File Reference

Utility for fast histogram aggregation. More...

#include <xgboost/data.h>
#include <xgboost/generic_parameters.h>
#include <limits>
#include <vector>
#include <algorithm>
#include <memory>
#include <utility>
#include <map>
#include "categorical.h"
#include "common.h"
#include "quantile.h"
#include "row_set.h"
#include "threading_utils.h"
#include "timer.h"
Include dependency graph for hist_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xgboost::common::HistogramCuts
 
struct  xgboost::common::Index
 Optionally compressed gradient index. The compression works only with dense data. More...
 
class  xgboost::common::HistCollection< GradientSumT >
 histogram of gradient statistics for multiple nodes More...
 
class  xgboost::common::ParallelGHistBuilder< GradientSumT >
 Stores temporary histograms to compute them in parallel Supports processing multiple tree-nodes for nested parallelism Able to reduce histograms across threads in efficient way. More...
 
class  xgboost::common::GHistBuilder< GradientSumT >
 builder for histograms of gradient statistics More...
 

Namespaces

 xgboost
 namespace of xgboost
 
 xgboost::common
 

Typedefs

using xgboost::common::GHistIndexRow = Span< uint32_t const >
 A single row in global histogram index. Directly represent the global index in the histogram entry. More...
 
template<typename GradientSumT >
using xgboost::common::GHistRow = Span< xgboost::detail::GradientPairInternal< GradientSumT > >
 

Enumerations

enum  xgboost::common::BinTypeSize : uint32_t { xgboost::common::kUint8BinsTypeSize = 1, xgboost::common::kUint16BinsTypeSize = 2, xgboost::common::kUint32BinsTypeSize = 4 }
 

Functions

HistogramCuts xgboost::common::SketchOnDMatrix (DMatrix *m, int32_t max_bins, int32_t n_threads, bool use_sorted=false, Span< float > const hessian={})
 Run CPU sketching on DMatrix. More...
 
template<typename GradientIndex >
int32_t XGBOOST_HOST_DEV_INLINE xgboost::common::BinarySearchBin (size_t begin, size_t end, GradientIndex const &data, uint32_t const fidx_begin, uint32_t const fidx_end)
 
template<typename GradientSumT >
void xgboost::common::InitilizeHistByZeroes (GHistRow< GradientSumT > hist, size_t begin, size_t end)
 fill a histogram by zeros More...
 
template<typename GradientSumT >
void xgboost::common::IncrementHist (GHistRow< GradientSumT > dst, const GHistRow< GradientSumT > add, size_t begin, size_t end)
 Increment hist as dst += add in range [begin, end) More...
 
template<typename GradientSumT >
void xgboost::common::CopyHist (GHistRow< GradientSumT > dst, const GHistRow< GradientSumT > src, size_t begin, size_t end)
 Copy hist from src to dst in range [begin, end) More...
 
template<typename GradientSumT >
void xgboost::common::SubtractionHist (GHistRow< GradientSumT > dst, const GHistRow< GradientSumT > src1, const GHistRow< GradientSumT > src2, size_t begin, size_t end)
 Compute Subtraction: dst = src1 - src2 in range [begin, end) More...
 

Detailed Description

Utility for fast histogram aggregation.

Copyright 2017-2022 by XGBoost Contributors

Author
Philip Cho, Tianqi Chen