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

@@ -403,7 +403,6 @@ TEST(hist_util, IndexBinData) {
size_t constexpr kRows = 100;
size_t constexpr kCols = 10;
size_t bin_id = 0;
for (auto max_bin : kBinSizes) {
auto p_fmat = RandomDataGenerator(kRows, kCols, 0).GenerateDMatix();
common::GHistIndexMatrix hmat;
@@ -434,7 +433,6 @@ TEST(hist_util, SparseIndexBinData) {
size_t constexpr kRows = 100;
size_t constexpr kCols = 10;
size_t bin_id = 0;
for (auto max_bin : bin_sizes) {
auto p_fmat = RandomDataGenerator(kRows, kCols, 0.2).GenerateDMatix();
common::GHistIndexMatrix hmat;