Fix compilation error on x86 (#6964)

Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
Livius
2021-05-14 07:31:49 +02:00
committed by GitHub
parent f94f479358
commit a4886c404a
2 changed files with 4 additions and 3 deletions

View File

@@ -734,8 +734,9 @@ XGB_DLL int XGBoosterPredictFromCSR(BoosterHandle handle, char const *indptr,
API_BEGIN();
CHECK_HANDLE();
std::shared_ptr<xgboost::data::CSRArrayAdapter> x{
new xgboost::data::CSRArrayAdapter{
StringView{indptr}, StringView{indices}, StringView{data}, cols}};
new xgboost::data::CSRArrayAdapter{StringView{indptr},
StringView{indices}, StringView{data},
static_cast<size_t>(cols)}};
std::shared_ptr<DMatrix> p_m {nullptr};
if (m) {
p_m = *static_cast<std::shared_ptr<DMatrix> *>(m);