Treelite
|
C API of Treelite, used for interfacing with other languages This header is used by both the runtime and the main package. More...
#include <stdio.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | TREELITE_EXTERN_C |
#define | TREELITE_DLL TREELITE_EXTERN_C |
Typedefs | |
typedef void * | DMatrixHandle |
handle to a data matrix | |
Functions | |
const char * | TreeliteGetLastError (void) |
display last error; can be called by multiple threads Note. Each thread will get the last error occured in its own context. More... | |
int | TreeliteRegisterLogCallback (void(*callback)(const char *)) |
register callback function for LOG(INFO) messages – helpful messages that are not errors. Note: this function can be called by multiple threads. The callback function will run on the thread that registered it More... | |
int | TreeliteDMatrixCreateFromFile (const char *path, const char *format, const char *data_type, int nthread, int verbose, DMatrixHandle *out) |
create a sparse DMatrix from a file More... | |
int | TreeliteDMatrixCreateFromCSR (const void *data, const char *data_type, const uint32_t *col_ind, const size_t *row_ptr, size_t num_row, size_t num_col, DMatrixHandle *out) |
create DMatrix from a (in-memory) CSR matrix More... | |
int | TreeliteDMatrixCreateFromMat (const void *data, const char *data_type, size_t num_row, size_t num_col, const void *missing_value, DMatrixHandle *out) |
create DMatrix from a (in-memory) dense matrix More... | |
int | TreeliteDMatrixGetDimension (DMatrixHandle handle, size_t *out_num_row, size_t *out_num_col, size_t *out_nelem) |
get dimensions of a DMatrix More... | |
int | TreeliteDMatrixFree (DMatrixHandle handle) |
delete DMatrix from memory More... | |
C API of Treelite, used for interfacing with other languages This header is used by both the runtime and the main package.
Copyright (c) 2017-2020 by Contributors
Definition in file c_api_common.h.
const char* TreeliteGetLastError | ( | void | ) |
display last error; can be called by multiple threads Note. Each thread will get the last error occured in its own context.
Definition at line 16 of file c_api_error.cc.
int TreeliteRegisterLogCallback | ( | void(*)(const char *) | callback | ) |
register callback function for LOG(INFO) messages – helpful messages that are not errors. Note: this function can be called by multiple threads. The callback function will run on the thread that registered it
Definition at line 26 of file c_api_common.cc.