MCPcopy Create free account
hub / github.com/dmlc/xgboost / InitRowPartitionForTest

Function InitRowPartitionForTest

tests/cpp/tree/hist/test_histogram.cc:41–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace xgboost::tree {
40namespace {
41void InitRowPartitionForTest(common::RowSetCollection *row_set, size_t n_samples,
42 size_t base_rowid = 0) {
43 auto &row_indices = *row_set->Data();
44 row_indices.resize(n_samples);
45 std::iota(row_indices.begin(), row_indices.end(), base_rowid);
46 row_set->Init();
47}
48} // anonymous namespace
49
50void TestAddHistRows(bool is_distributed) {

Callers 1

Calls 5

resizeMethod · 0.80
DataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected