Skip to content

Commit

Permalink
set num_threads of share_state (microsoft#3151)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jul 18, 2020
1 parent f5f27ca commit 67b982c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/LightGBM/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ struct TrainingShareStates {
hist_buf;

void SetMultiValBin(MultiValBin* bin) {
num_threads = OMP_NUM_THREADS();
if (bin == nullptr) {
return;
}
multi_val_bin.reset(bin);
num_threads = OMP_NUM_THREADS();
num_bin_aligned =
(bin->num_bin() + kAlignedSize - 1) / kAlignedSize * kAlignedSize;
size_t new_size = static_cast<size_t>(num_bin_aligned) * 2 * num_threads;
Expand Down

0 comments on commit 67b982c

Please sign in to comment.