Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Razdoburdin committed Jan 23, 2025
1 parent 1780f5b commit 922af51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/quantile.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ class SketchContainerImpl {
dmlc::OMPException exc;
size_t ridx_block_size = batch.Size() / n_threads_ + (batch.Size() % n_threads_ > 0);
size_t min_ridx_block_size = 1024;
if ((n_features < n_threads_) && (ridx_block_size > min_ridx_block_size)) {
if ((n_features < size_t(n_threads_)) && (ridx_block_size > min_ridx_block_size)) {
/* Row-wise parallelisation.
*/
std::vector<std::set<float>> categories_buff(n_threads_ * n_features);
Expand Down Expand Up @@ -897,7 +897,7 @@ class SketchContainerImpl {
size_t fidx_begin = tid * fidx_block_size;
size_t fidx_end = std::min(fidx_begin + fidx_block_size, n_features);
for (size_t ii = fidx_begin; ii < fidx_end; ++ii) {
for (size_t th = 0; th < n_threads_; ++th) {
for (int th = 0; th < n_threads_; ++th) {
if (IsCat(feature_types_, ii)) {
categories_[ii].merge(categories_buff[th * n_features + ii]);
} else {
Expand Down

0 comments on commit 922af51

Please sign in to comment.