Remove unused code. (#7175)

This commit is contained in:
Jiaming Yuan 2021-08-18 14:02:19 +08:00 committed by GitHub
parent 01b7acba30
commit bf562bd33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 30 deletions

View File

@ -1,5 +1,5 @@
/*!
* Copyright 2017-2019 XGBoost contributors
* Copyright 2017-2021 XGBoost contributors
*/
#include <thrust/iterator/discard_iterator.h>
#include <thrust/iterator/transform_output_iterator.h>
@ -10,16 +10,6 @@
namespace xgboost {
namespace tree {
struct IndicateLeftTransform {
bst_node_t left_nidx;
explicit IndicateLeftTransform(bst_node_t left_nidx) : left_nidx(left_nidx) {}
__host__ __device__ __forceinline__ size_t
operator()(const bst_node_t& x) const {
return x == left_nidx ? 1 : 0;
}
};
struct IndexFlagTuple {
size_t idx;
size_t flag;

View File

@ -1,5 +1,5 @@
/*!
* Copyright 2017-2020 XGBoost contributors
* Copyright 2017-2021 XGBoost contributors
*/
#include <thrust/copy.h>
#include <thrust/reduce.h>
@ -239,24 +239,6 @@ struct GPUHistMakerDevice {
}
}
// Get vector of at least n initialised streams
std::vector<cudaStream_t>& GetStreams(int n) {
if (n > streams.size()) {
for (auto& stream : streams) {
dh::safe_cuda(cudaStreamDestroy(stream));
}
streams.clear();
streams.resize(n);
for (auto& stream : streams) {
dh::safe_cuda(cudaStreamCreate(&stream));
}
}
return streams;
}
// Reset values for each update iteration
// Note that the column sampler must be passed by value because it is not
// thread safe