xgboost
Classes | Public Member Functions | Protected Attributes | List of all members
xgboost::common::PartitionBuilder< BlockSize > Class Template Reference

#include <partition_builder.h>

Collaboration diagram for xgboost::common::PartitionBuilder< BlockSize >:
Collaboration graph

Classes

struct  BlockInfo
 

Public Member Functions

template<typename Func >
void Init (const size_t n_tasks, size_t n_nodes, Func funcNTask)
 
template<bool default_left, bool any_missing, typename ColumnType >
std::pair< size_t, size_t > PartitionKernel (const ColumnType &column, common::Span< const size_t > rid_span, const int32_t split_cond, common::Span< size_t > left_part, common::Span< size_t > right_part)
 
template<typename BinIdxType , bool any_missing>
void Partition (const size_t node_in_set, const size_t nid, const common::Range1d range, const int32_t split_cond, const ColumnMatrix &column_matrix, const RegTree &tree, const size_t *rid)
 
void AllocateForTask (size_t id)
 
common::Span< size_t > GetLeftBuffer (int nid, size_t begin, size_t end)
 
common::Span< size_t > GetRightBuffer (int nid, size_t begin, size_t end)
 
void SetNLeftElems (int nid, size_t begin, size_t end, size_t n_left)
 
void SetNRightElems (int nid, size_t begin, size_t end, size_t n_right)
 
size_t GetNLeftElems (int nid) const
 
size_t GetNRightElems (int nid) const
 
void CalculateRowOffsets ()
 
void MergeToArray (int nid, size_t begin, size_t *rows_indexes)
 
size_t GetTaskIdx (int nid, size_t begin)
 

Protected Attributes

std::vector< std::pair< size_t, size_t > > left_right_nodes_sizes_
 
std::vector< size_t > blocks_offsets_
 
std::vector< std::shared_ptr< BlockInfo > > mem_blocks_
 
size_t max_n_tasks_ = 0
 

Member Function Documentation

◆ AllocateForTask()

template<size_t BlockSize>
void xgboost::common::PartitionBuilder< BlockSize >::AllocateForTask ( size_t  id)
inline

◆ CalculateRowOffsets()

template<size_t BlockSize>
void xgboost::common::PartitionBuilder< BlockSize >::CalculateRowOffsets ( )
inline

◆ GetLeftBuffer()

template<size_t BlockSize>
common::Span<size_t> xgboost::common::PartitionBuilder< BlockSize >::GetLeftBuffer ( int  nid,
size_t  begin,
size_t  end 
)
inline

◆ GetNLeftElems()

template<size_t BlockSize>
size_t xgboost::common::PartitionBuilder< BlockSize >::GetNLeftElems ( int  nid) const
inline

◆ GetNRightElems()

template<size_t BlockSize>
size_t xgboost::common::PartitionBuilder< BlockSize >::GetNRightElems ( int  nid) const
inline

◆ GetRightBuffer()

template<size_t BlockSize>
common::Span<size_t> xgboost::common::PartitionBuilder< BlockSize >::GetRightBuffer ( int  nid,
size_t  begin,
size_t  end 
)
inline

◆ GetTaskIdx()

template<size_t BlockSize>
size_t xgboost::common::PartitionBuilder< BlockSize >::GetTaskIdx ( int  nid,
size_t  begin 
)
inline

◆ Init()

template<size_t BlockSize>
template<typename Func >
void xgboost::common::PartitionBuilder< BlockSize >::Init ( const size_t  n_tasks,
size_t  n_nodes,
Func  funcNTask 
)
inline

◆ MergeToArray()

template<size_t BlockSize>
void xgboost::common::PartitionBuilder< BlockSize >::MergeToArray ( int  nid,
size_t  begin,
size_t *  rows_indexes 
)
inline

◆ Partition()

template<size_t BlockSize>
template<typename BinIdxType , bool any_missing>
void xgboost::common::PartitionBuilder< BlockSize >::Partition ( const size_t  node_in_set,
const size_t  nid,
const common::Range1d  range,
const int32_t  split_cond,
const ColumnMatrix column_matrix,
const RegTree tree,
const size_t *  rid 
)
inline

◆ PartitionKernel()

template<size_t BlockSize>
template<bool default_left, bool any_missing, typename ColumnType >
std::pair<size_t, size_t> xgboost::common::PartitionBuilder< BlockSize >::PartitionKernel ( const ColumnType column,
common::Span< const size_t >  rid_span,
const int32_t  split_cond,
common::Span< size_t >  left_part,
common::Span< size_t >  right_part 
)
inline

◆ SetNLeftElems()

template<size_t BlockSize>
void xgboost::common::PartitionBuilder< BlockSize >::SetNLeftElems ( int  nid,
size_t  begin,
size_t  end,
size_t  n_left 
)
inline

◆ SetNRightElems()

template<size_t BlockSize>
void xgboost::common::PartitionBuilder< BlockSize >::SetNRightElems ( int  nid,
size_t  begin,
size_t  end,
size_t  n_right 
)
inline

Member Data Documentation

◆ blocks_offsets_

template<size_t BlockSize>
std::vector<size_t> xgboost::common::PartitionBuilder< BlockSize >::blocks_offsets_
protected

◆ left_right_nodes_sizes_

template<size_t BlockSize>
std::vector<std::pair<size_t, size_t> > xgboost::common::PartitionBuilder< BlockSize >::left_right_nodes_sizes_
protected

◆ max_n_tasks_

template<size_t BlockSize>
size_t xgboost::common::PartitionBuilder< BlockSize >::max_n_tasks_ = 0
protected

◆ mem_blocks_

template<size_t BlockSize>
std::vector<std::shared_ptr<BlockInfo> > xgboost::common::PartitionBuilder< BlockSize >::mem_blocks_
protected

The documentation for this class was generated from the following file: