Remove some warnings from clang. (#7533)
* Unused variable. * Unnecessary virtual function.
This commit is contained in:
parent
ec56d5869b
commit
eea094e1bc
@ -115,12 +115,10 @@ class JsonReader {
|
|||||||
class JsonWriter {
|
class JsonWriter {
|
||||||
static constexpr size_t kIndentSize = 2;
|
static constexpr size_t kIndentSize = 2;
|
||||||
|
|
||||||
size_t n_spaces_;
|
|
||||||
std::vector<char>* stream_;
|
std::vector<char>* stream_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit JsonWriter(std::vector<char>* stream) :
|
explicit JsonWriter(std::vector<char>* stream) : stream_{stream} {}
|
||||||
n_spaces_{0}, stream_{stream} {}
|
|
||||||
|
|
||||||
virtual ~JsonWriter() = default;
|
virtual ~JsonWriter() = default;
|
||||||
|
|
||||||
|
|||||||
@ -165,9 +165,9 @@ inline float GetMissing(Json const &config) {
|
|||||||
|
|
||||||
// Safe guard some global variables from being changed by XGBoost.
|
// Safe guard some global variables from being changed by XGBoost.
|
||||||
class XGBoostAPIGuard {
|
class XGBoostAPIGuard {
|
||||||
|
#if defined(XGBOOST_USE_CUDA)
|
||||||
int32_t device_id_ {0};
|
int32_t device_id_ {0};
|
||||||
|
|
||||||
#if defined(XGBOOST_USE_CUDA)
|
|
||||||
void SetGPUAttribute();
|
void SetGPUAttribute();
|
||||||
void RestoreGPUAttribute();
|
void RestoreGPUAttribute();
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -166,11 +166,8 @@ class QuantileHistMaker: public TreeUpdater {
|
|||||||
builder_monitor_.Init("Quantile::Builder");
|
builder_monitor_.Init("Quantile::Builder");
|
||||||
}
|
}
|
||||||
// update one tree, growing
|
// update one tree, growing
|
||||||
virtual void Update(const GHistIndexMatrix& gmat,
|
void Update(const GHistIndexMatrix& gmat, const ColumnMatrix& column_matrix,
|
||||||
const ColumnMatrix& column_matrix,
|
HostDeviceVector<GradientPair>* gpair, DMatrix* p_fmat, RegTree* p_tree);
|
||||||
HostDeviceVector<GradientPair>* gpair,
|
|
||||||
DMatrix* p_fmat,
|
|
||||||
RegTree* p_tree);
|
|
||||||
|
|
||||||
bool UpdatePredictionCache(const DMatrix* data,
|
bool UpdatePredictionCache(const DMatrix* data,
|
||||||
linalg::VectorView<float> out_preds);
|
linalg::VectorView<float> out_preds);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user