Skip to content

Commit

Permalink
fix a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke committed Dec 5, 2017
1 parent 699d438 commit 41c9df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/treelearner/serial_tree_learner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void SerialTreeLearner::BeforeTrain() {
// initialize used features
std::memset(is_feature_used_.data(), 0, sizeof(int8_t) * num_features_);
// Get used feature at current tree
auto sampled_indices = random_.Sample(valid_feature_indices_.size(), used_feature_cnt);
auto sampled_indices = random_.Sample(static_cast<int>(valid_feature_indices_.size()), used_feature_cnt);
int omp_loop_size = static_cast<int>(sampled_indices.size());
#pragma omp parallel for schedule(static, 512) if (omp_loop_size >= 1024)
for (int i = 0; i < omp_loop_size; ++i) {
Expand Down

0 comments on commit 41c9df6

Please sign in to comment.