| 84 | |
| 85 | namespace { |
| 86 | void BuildTree(Context const* ctx, DMatrix* p_fmat, GradientContainer* grad, |
| 87 | std::string const& name, Args const& args, RegTree* p_tree) { |
| 88 | tree::TrainParam param; |
| 89 | param.Init(args); |
| 90 | ObjInfo task{ObjInfo::kRegression}; |
| 91 | auto up = std::unique_ptr<TreeUpdater>{TreeUpdater::Create(name, ctx, &task)}; |
| 92 | up->Configure({}); |
| 93 | std::vector<HostDeviceVector<bst_node_t>> position(1); |
| 94 | up->Update(¶m, grad, p_fmat, common::Span{position}, {p_tree}); |
| 95 | } |
| 96 | } // namespace |
| 97 | |
| 98 | /** |