Skip to content

Commit

Permalink
Change of name.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 8, 2020
1 parent 4f0329e commit 9166f6f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/common/hist_util.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ void MakeEntriesFromAdapter(AdapterBatch const& batch, BatchIter batch_iter,
}

template <typename AdapterBatch>
void ProcessBatch(AdapterBatch const& batch, int device, size_t columns,
size_t begin, size_t end, float missing,
SketchContainer* sketch_container, int num_cuts) {
void ProcessBatchSlidingWindow(AdapterBatch const& batch, int device, size_t columns,
size_t begin, size_t end, float missing,
SketchContainer* sketch_container, int num_cuts) {
// Copy current subset of valid elements into temporary storage and sort
dh::caching_device_vector<Entry> sorted_entries;
dh::caching_device_vector<size_t> column_sizes_scan;
Expand Down Expand Up @@ -244,11 +244,11 @@ void SortByWeight(dh::XGBCachingDeviceAllocator<char>* alloc,
dh::caching_device_vector<Entry>* sorted_entries);

template <typename Batch>
void ProcessWeightedBatch(Batch batch, MetaInfo const& info,
int num_cuts_per_feature,
bool is_ranking, float missing, int device,
size_t columns, size_t begin, size_t end,
SketchContainer *sketch_container) {
void ProcessWeightedSlidingWindow(Batch batch, MetaInfo const& info,
int num_cuts_per_feature,
bool is_ranking, float missing, int device,
size_t columns, size_t begin, size_t end,
SketchContainer *sketch_container) {
dh::XGBCachingDeviceAllocator<char> alloc;
dh::safe_cuda(cudaSetDevice(device));
info.weights_.SetDevice(device);
Expand Down Expand Up @@ -344,8 +344,8 @@ HistogramCuts AdapterDeviceSketch(AdapterT* adapter, int num_bins,
begin += sketch_batch_num_elements) {
size_t end = std::min(batch.Size(), size_t(begin + sketch_batch_num_elements));
auto const& batch = adapter->Value();
ProcessBatch(batch, adapter->DeviceIdx(), adapter->NumColumns(),
begin, end, missing, &sketch_container, num_cuts);
ProcessBatchSlidingWindow(batch, adapter->DeviceIdx(), adapter->NumColumns(),
begin, end, missing, &sketch_container, num_cuts);
}

dense_cuts.Init(&sketch_container.sketches_, num_bins, adapter->NumRows());
Expand All @@ -365,8 +365,8 @@ void AdapterDeviceSketch(Batch batch, int num_bins,
num_cols, device, num_cuts);
for (auto begin = 0ull; begin < batch.Size(); begin += sketch_batch_num_elements) {
size_t end = std::min(batch.Size(), size_t(begin + sketch_batch_num_elements));
ProcessBatch(batch, device, num_cols,
begin, end, missing, sketch_container, num_cuts);
ProcessBatchSlidingWindow(batch, device, num_cols,
begin, end, missing, sketch_container, num_cuts);
}
}

Expand All @@ -385,10 +385,10 @@ void AdapterDeviceSketchWeighted(Batch batch, int num_bins,
num_cols, device, num_cuts);
for (auto begin = 0ull; begin < batch.Size(); begin += sketch_batch_num_elements) {
size_t end = std::min(batch.Size(), size_t(begin + sketch_batch_num_elements));
ProcessWeightedBatch(batch, info,
num_cuts,
CutsBuilder::UseGroup(info), missing, device, num_cols, begin, end,
sketch_container);
ProcessWeightedSlidingWindow(batch, info,
num_cuts,
CutsBuilder::UseGroup(info), missing, device, num_cols, begin, end,
sketch_container);
}
}
} // namespace common
Expand Down

0 comments on commit 9166f6f

Please sign in to comment.