Prevent copying SimpleDMatrix. (#5453)

* Set default dtor for SimpleDMatrix to initialize default copy ctor, which is
deleted due to unique ptr.

* Remove commented code.
* Remove warning for calling host function (std::max).
* Remove warning for initialization order.
* Remove warning for unused variables.
This commit is contained in:
Jiaming Yuan
2020-04-02 07:01:49 +08:00
committed by GitHub
parent e86030c360
commit 29c6ad943a
9 changed files with 36 additions and 50 deletions

View File

@@ -64,6 +64,11 @@ inline std::vector<std::string> Split(const std::string& s, char delim) {
return ret;
}
template <typename T>
XGBOOST_DEVICE T Max(T a, T b) {
return a < b ? b : a;
}
// simple routine to convert any data to string
template<typename T>
inline std::string ToString(const T& data) {