Skip to content

Commit

Permalink
Workaround msvc.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 28, 2020
1 parent 0860a37 commit 472ec52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/cpp/test_learner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ TEST(Learner, JsonModelIO) {
TEST(Learner, MultiThreadedPredict) {
size_t constexpr kRows = 1000;
size_t constexpr kCols = 1000;
size_t constexpr kIters = 10;

std::shared_ptr<DMatrix> p_dmat{
RandomDataGenerator{kRows, kCols, 0}.GenerateDMatrix()};
Expand All @@ -208,6 +207,7 @@ TEST(Learner, MultiThreadedPredict) {
for (uint32_t thread_id = 0;
thread_id < 2 * std::thread::hardware_concurrency(); ++thread_id) {
threads.emplace_back([learner, p_data] {
size_t constexpr kIters = 10;
auto &entry = learner->GetThreadLocal().prediction_entry;
for (size_t iter = 0; iter < kIters; ++iter) {
learner->Predict(p_data, false, &entry.predictions);
Expand Down

0 comments on commit 472ec52

Please sign in to comment.