Skip to content

Commit 922af51

Browse files
author
Dmitry Razdoburdin
committed
fix
1 parent 1780f5b commit 922af51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/quantile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ class SketchContainerImpl {
843843
dmlc::OMPException exc;
844844
size_t ridx_block_size = batch.Size() / n_threads_ + (batch.Size() % n_threads_ > 0);
845845
size_t min_ridx_block_size = 1024;
846-
if ((n_features < n_threads_) && (ridx_block_size > min_ridx_block_size)) {
846+
if ((n_features < size_t(n_threads_)) && (ridx_block_size > min_ridx_block_size)) {
847847
/* Row-wise parallelisation.
848848
*/
849849
std::vector<std::set<float>> categories_buff(n_threads_ * n_features);
@@ -897,7 +897,7 @@ class SketchContainerImpl {
897897
size_t fidx_begin = tid * fidx_block_size;
898898
size_t fidx_end = std::min(fidx_begin + fidx_block_size, n_features);
899899
for (size_t ii = fidx_begin; ii < fidx_end; ++ii) {
900-
for (size_t th = 0; th < n_threads_; ++th) {
900+
for (int th = 0; th < n_threads_; ++th) {
901901
if (IsCat(feature_types_, ii)) {
902902
categories_[ii].merge(categories_buff[th * n_features + ii]);
903903
} else {

0 commit comments

Comments
 (0)