Commit 41c9df69 authored by Guolin Ke's avatar Guolin Ke
Browse files

fix a warning

parent 699d4381
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment