12 #ifndef TREELITE_C_API_RUNTIME_H_ 13 #define TREELITE_C_API_RUNTIME_H_ 46 const uint32_t* col_ind,
47 const size_t* row_ptr,
48 size_t num_row,
size_t num_col,
67 size_t num_row,
size_t num_col,
123 size_t* out_result_size);
156 #endif // TREELITE_C_API_RUNTIME_H_ void * DenseBatchHandle
handle to batch of dense data rows
void * CSRBatchHandle
handle to batch of sparse data rows
int TreelitePredictorPredictBatch(PredictorHandle handle, void *batch, int batch_sparse, int nthread, int verbose, int pred_margin, float *out_result, size_t *out_result_size)
make predictions on a batch of data rows
int TreelitePredictorQueryResultSize(PredictorHandle handle, void *batch, int batch_sparse, size_t *out)
Given a batch of data rows, query the necessary size of array to hold predictions for all data points...
int TreelitePredictorLoad(const char *library_path, PredictorHandle *out)
load prediction code into memory. This function assumes that the prediction code has been already com...
int TreeliteBatchGetDimension(void *handle, int batch_sparse, size_t *out_num_row, size_t *out_num_col)
get dimensions of a batch
int TreeliteAssembleSparseBatch(const float *data, const uint32_t *col_ind, const size_t *row_ptr, size_t num_row, size_t num_col, CSRBatchHandle *out)
assemble a sparse batch
int TreeliteDeleteDenseBatch(DenseBatchHandle handle)
delete a dense batch from memory
int TreeliteDeleteSparseBatch(CSRBatchHandle handle)
delete a sparse batch from memory
int TreeliteAssembleDenseBatch(const float *data, float missing_value, size_t num_row, size_t num_col, DenseBatchHandle *out)
assemble a dense batch
C API of treelite, used for interfacing with other languages This header is used by both the runtime ...
void * PredictorHandle
handle to predictor class
int TreelitePredictorQueryNumOutputGroup(PredictorHandle handle, size_t *out)
Get the number of output groups in the loaded model The number is 1 for most tasks; it is greater tha...
int TreelitePredictorFree(PredictorHandle handle)
delete predictor from memory