From 3186816c2b275ed4bee026ea31ee1fb6fdc27075 Mon Sep 17 00:00:00 2001 From: Rong Ou Date: Thu, 29 Jun 2023 13:32:13 -0700 Subject: [PATCH] review feedback --- src/predictor/gpu_predictor.cu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/predictor/gpu_predictor.cu b/src/predictor/gpu_predictor.cu index 1f7f69c3a999..2eee14e30678 100644 --- a/src/predictor/gpu_predictor.cu +++ b/src/predictor/gpu_predictor.cu @@ -799,23 +799,23 @@ class ColumnSplitHelper { collective::Synchronize(ctx_->gpu_id); } - static void ResizeBitVectors(dh::caching_device_vector* decision_storage, + void ResizeBitVectors(dh::caching_device_vector* decision_storage, dh::caching_device_vector* 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); } }