Medial Code Documentation
Loading...
Searching...
No Matches
ellpack_page.h
1
4#ifndef XGBOOST_DATA_ELLPACK_PAGE_H_
5#define XGBOOST_DATA_ELLPACK_PAGE_H_
6
7#include <memory> // for unique_ptr
8
9#include "../common/hist_util.h" // for HistogramCuts
10#include "xgboost/context.h" // for Context
11#include "xgboost/data.h" // for DMatrix, BatchParam
12
13namespace xgboost {
14class EllpackPageImpl;
22 public:
36 explicit EllpackPage(Context const* ctx, DMatrix* dmat, const BatchParam& param);
37
40
42
44 [[nodiscard]] size_t Size() const;
45
47 void SetBaseRowId(std::size_t row_id);
48
49 [[nodiscard]] const EllpackPageImpl* Impl() const { return impl_.get(); }
50 EllpackPageImpl* Impl() { return impl_.get(); }
51
52 [[nodiscard]] common::HistogramCuts& Cuts();
53 [[nodiscard]] common::HistogramCuts const& Cuts() const;
54
55 private:
56 std::unique_ptr<EllpackPageImpl> impl_;
57};
58} // namespace xgboost
59#endif // XGBOOST_DATA_ELLPACK_PAGE_H_
Internal data structured used by XGBoost during training.
Definition data.h:509
Definition ellpack_page.cc:13
A page stored in ELLPACK format.
Definition ellpack_page.h:21
void SetBaseRowId(std::size_t row_id)
Set the base row id for this page.
Definition ellpack_page.cc:33
EllpackPage()
Default constructor.
size_t Size() const
Definition ellpack_page.cc:37
~EllpackPage()
Destructor.
Definition ellpack_page.cc:28
Copyright 2014-2023, XGBoost Contributors.
Copyright 2015-2023 by XGBoost Contributors.
namespace of xgboost
Definition base.h:90
Parameters for constructing histogram index batches.
Definition data.h:244
Runtime context for XGBoost.
Definition context.h:84