Rename and extract Context. (#8528)
* Rename `GenericParameter` to `Context`. * Rename header file to reflect the change. * Rename all references.
This commit is contained in:
@@ -86,7 +86,7 @@ class IterativeDMatrix : public DMatrix {
|
||||
LOG(FATAL) << "Slicing DMatrix is not supported for Quantile DMatrix.";
|
||||
return nullptr;
|
||||
}
|
||||
DMatrix *SliceCol(std::size_t start, std::size_t size) override {
|
||||
DMatrix *SliceCol(std::size_t, std::size_t) override {
|
||||
LOG(FATAL) << "Slicing DMatrix columns is not supported for Quantile DMatrix.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "xgboost/data.h"
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "xgboost/c_api.h"
|
||||
#include "adapter.h"
|
||||
#include "xgboost/c_api.h"
|
||||
#include "xgboost/context.h"
|
||||
#include "xgboost/data.h"
|
||||
|
||||
namespace xgboost {
|
||||
namespace data {
|
||||
@@ -87,7 +87,7 @@ class DMatrixProxy : public DMatrix {
|
||||
LOG(FATAL) << "Slicing DMatrix is not supported for Proxy DMatrix.";
|
||||
return nullptr;
|
||||
}
|
||||
DMatrix* SliceCol(std::size_t start, std::size_t size) override {
|
||||
DMatrix* SliceCol(std::size_t, std::size_t) override {
|
||||
LOG(FATAL) << "Slicing DMatrix columns is not supported for Proxy DMatrix.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ DMatrix* SimpleDMatrix::SliceCol(std::size_t start, std::size_t size) {
|
||||
auto& h_data = out_page.data.HostVector();
|
||||
auto& h_offset = out_page.offset.HostVector();
|
||||
size_t rptr{0};
|
||||
for (auto i = 0; i < this->Info().num_row_; i++) {
|
||||
for (bst_row_t i = 0; i < this->Info().num_row_; i++) {
|
||||
auto inst = batch[i];
|
||||
auto prev_size = h_data.size();
|
||||
std::copy_if(inst.begin(), inst.end(), std::back_inserter(h_data), [&](Entry e) {
|
||||
|
||||
@@ -107,7 +107,7 @@ class SparsePageDMatrix : public DMatrix {
|
||||
LOG(FATAL) << "Slicing DMatrix is not supported for external memory.";
|
||||
return nullptr;
|
||||
}
|
||||
DMatrix *SliceCol(std::size_t start, std::size_t size) override {
|
||||
DMatrix *SliceCol(std::size_t, std::size_t) override {
|
||||
LOG(FATAL) << "Slicing DMatrix columns is not supported for external memory.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user