From 4e8ed8c789be66c44f0810bbda7b489ed5e16331 Mon Sep 17 00:00:00 2001 From: Shvets Kirill Date: Tue, 9 Feb 2021 07:20:58 -0800 Subject: [PATCH] fix order --- src/predictor/cpu_predictor.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/predictor/cpu_predictor.cc b/src/predictor/cpu_predictor.cc index 3b09b29daf0b..8473e89f9562 100644 --- a/src/predictor/cpu_predictor.cc +++ b/src/predictor/cpu_predictor.cc @@ -65,8 +65,8 @@ inline void PredictByAllTrees(gbm::GBTreeModel const &model, const size_t tree_b } template -void FVecFill(const size_t block_size, const size_t batch_offset, DataView* batch, - const size_t fvec_offset, std::vector* p_feats, int num_feature) { +void FVecFill(const size_t block_size, const size_t batch_offset, const int num_feature, + DataView* batch, const size_t fvec_offset, std::vector* p_feats) { for (size_t i = 0; i < block_size; ++i) { RegTree::FVec &feats = (*p_feats)[fvec_offset + i]; if (feats.Size() == 0) { @@ -163,7 +163,7 @@ void PredictBatchByBlockOfRowsKernel(DataView batch, std::vector *out const size_t block_size = std::min(nsize - batch_offset, block_of_rows_size); const size_t fvec_offset = omp_get_thread_num() * block_of_rows_size; - FVecFill(block_size, batch_offset, &batch, fvec_offset, p_thread_temp, num_feature); + FVecFill(block_size, batch_offset, num_feature, &batch, fvec_offset, p_thread_temp); // process block of rows through all trees to keep cache locality PredictByAllTrees(model, tree_begin, tree_end, out_preds, batch_offset + batch.base_rowid, num_group, thread_temp, fvec_offset, block_size);