Skip to content

Commit a96c3b9

Browse files
committed
More clean-up
1 parent aea9cd3 commit a96c3b9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/c_api/c_api.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,12 +1028,11 @@ XGB_DLL int XGBoosterInplacePredict(BoosterHandle handle,
10281028
CHECK_HANDLE();
10291029
xgboost::bst_ulong out_dim;
10301030

1031-
auto proxy = data::DMatrixProxy();
10321031
auto *learner = static_cast<xgboost::Learner *>(handle);
10331032
auto iteration_end = GetIterationFromTreeLimit(ntree_limit, learner);
1034-
proxy.SetDenseData(data, num_rows, num_features);
1035-
std::shared_ptr<DMatrix> p_m{&proxy};
1036-
InplacePredictImplCore(p_m, learner, (xgboost::PredictionType)0, missing, num_rows, num_features,
1033+
auto proxy = std::make_shared<data::DMatrixProxy>();
1034+
proxy->SetDenseData(data, num_rows, num_features);
1035+
InplacePredictImplCore(proxy, learner, (xgboost::PredictionType)0, missing, num_rows, num_features,
10371036
0, iteration_end, true, len, &out_dim, out_result);
10381037
API_END();
10391038
}

0 commit comments

Comments
 (0)