Treelite
gtil.h
Go to the documentation of this file.
1 
10 #ifndef TREELITE_GTIL_H_
11 #define TREELITE_GTIL_H_
12 
13 #include <cstddef>
14 
15 namespace treelite {
16 
17 class Model;
18 class DMatrix;
19 
20 namespace gtil {
21 
33 std::size_t Predict(const Model* model, const DMatrix* input, float* output, int nthread,
34  bool pred_transform);
47 std::size_t Predict(const Model* model, const float* input, std::size_t num_row, float* output,
48  int nthread, bool pred_transform);
56 std::size_t GetPredictOutputSize(const Model* model, std::size_t num_row);
64 std::size_t GetPredictOutputSize(const Model* model, const DMatrix* input);
65 
66 } // namespace gtil
67 } // namespace treelite
68 
69 #endif // TREELITE_GTIL_H_
std::size_t Predict(const Model *model, const DMatrix *input, float *output, int nthread, bool pred_transform)
Predict with a DMatrix.
Definition: predict.cc:447
std::size_t GetPredictOutputSize(const Model *model, std::size_t num_row)
Given a batch of data rows, query the necessary size of array to hold predictions for all data points...
Definition: predict.cc:479