Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rongou committed Jun 29, 2023
1 parent df52b2e commit 3186816
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/predictor/gpu_predictor.cu
Original file line number Diff line number Diff line change
Expand Up @@ -799,23 +799,23 @@ class ColumnSplitHelper {
collective::Synchronize(ctx_->gpu_id);
}

static void ResizeBitVectors(dh::caching_device_vector<BitType>* decision_storage,
void ResizeBitVectors(dh::caching_device_vector<BitType>* decision_storage,
dh::caching_device_vector<BitType>* missing_storage,
std::size_t total_bits) {
std::size_t total_bits) const {
auto const size = BitVector::ComputeStorageSize(total_bits);
auto const old_decision_size = decision_storage->size();
if (old_decision_size < size) {
decision_storage->resize(size);
}
if (old_decision_size != 0) {
thrust::fill(decision_storage->begin(), decision_storage->end(), 0);
thrust::fill(ctx_->CUDACtx()->CTP(), decision_storage->begin(), decision_storage->end(), 0);
}
auto const old_missing_size = missing_storage->size();
if (old_missing_size < size) {
missing_storage->resize(size);
}
if (old_missing_size != 0) {
thrust::fill(missing_storage->begin(), missing_storage->end(), 0);
thrust::fill(ctx_->CUDACtx()->CTP(), missing_storage->begin(), missing_storage->end(), 0);
}
}

Expand Down

0 comments on commit 3186816

Please sign in to comment.