xgboost
|
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...
#include <hist_util.h>
Public Types | |
using | GHistRowT = GHistRow< GradientSumT > |
Public Member Functions | |
void | Init (size_t nbins) |
void | Reset (size_t nthreads, size_t nodes, const BlockedSpace2d &space, const std::vector< GHistRowT > &targeted_hists) |
GHistRowT | GetInitializedHist (size_t tid, size_t nid) |
void | ReduceHist (size_t nid, size_t begin, size_t end) |
Protected Member Functions | |
void | MatchThreadsToNodes (const BlockedSpace2d &space) |
void | AllocateAdditionalHistograms () |
void | MatchNodeNidPairToHist () |
Protected Attributes | |
size_t | nbins_ = 0 |
number of bins in each histogram More... | |
size_t | nthreads_ = 0 |
number of threads for parallel computation More... | |
size_t | nodes_ = 0 |
number of nodes which will be processed in parallel More... | |
HistCollection< GradientSumT > | hist_buffer_ |
Buffer for additional histograms for Parallel processing. More... | |
std::vector< int > | hist_was_used_ |
Marks which hists were used, it means that they should be merged. Contains only {true or false} values but 'int' is used instead of 'bool', because std::vector<bool> isn't thread safe. More... | |
std::vector< bool > | threads_to_nids_map_ |
Buffer for additional histograms for Parallel processing. More... | |
std::vector< GHistRowT > | targeted_hists_ |
Contains histograms for final results. More... | |
std::vector< GHistRowT > | hist_memory_ |
Allocated memory for histograms used for construction. More... | |
std::map< std::pair< size_t, size_t >, size_t > | tid_nid_to_hist_ |
map pair {tid, nid} to index of allocated histogram from hist_memory_ More... | |
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.
using xgboost::common::ParallelGHistBuilder< GradientSumT >::GHistRowT = GHistRow<GradientSumT> |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
protected |
Buffer for additional histograms for Parallel processing.
|
protected |
Allocated memory for histograms used for construction.
|
protected |
Marks which hists were used, it means that they should be merged. Contains only {true or false} values but 'int' is used instead of 'bool', because std::vector<bool> isn't thread safe.
|
protected |
number of bins in each histogram
|
protected |
number of nodes which will be processed in parallel
|
protected |
number of threads for parallel computation
|
protected |
Contains histograms for final results.
|
protected |
Buffer for additional histograms for Parallel processing.
|
protected |
map pair {tid, nid} to index of allocated histogram from hist_memory_