Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Sep 24, 2021
1 parent e28cb06 commit 0292ffb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/predictor/cpu_predictor.cc
Expand Up @@ -254,8 +254,9 @@ class CPUPredictor : public Predictor {
int32_t tree_end) const {
const int threads = omp_get_max_threads();
constexpr double kDensityThresh = .5;
double density = double(p_fmat->Info().num_row_ * p_fmat->Info().num_col_) /
double(p_fmat->Info().num_nonzero_);
double density =
static_cast<double>(p_fmat->Info().num_nonzero_) /
static_cast<double>(p_fmat->Info().num_row_ * p_fmat->Info().num_col_);
bool blocked = density > kDensityThresh;

std::vector<RegTree::FVec> feat_vecs;
Expand Down

0 comments on commit 0292ffb

Please sign in to comment.