#ifndef MNN_WRAPPER_H
#define MNN_WRAPPER_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MNN_Interpreter MNN_Interpreter;
typedef struct MNN_Session MNN_Session;
typedef struct MNN_Tensor MNN_Tensor;
typedef struct {
unsigned int precision;
unsigned int power;
unsigned int memory;
} MNN_BackendConfig;
typedef struct {
unsigned int type_;
int numThread;
MNN_BackendConfig* backendConfig;
} MNN_ScheduleConfig;
typedef enum {
MNN_TENSOR_MAP_READ = 1,
MNN_TENSOR_MAP_WRITE = 0
} MNN_Tensor_MapType;
typedef struct {
const char* name;
MNN_Tensor* tensor;
} MNN_TensorInfo;
MNN_Interpreter* MNN_Interpreter_createFromFile(const char* file);
MNN_Interpreter* MNN_Interpreter_createFromBuffer(const void* buffer, int size);
void MNN_Interpreter_destroy(MNN_Interpreter* net);
MNN_Session* MNN_Interpreter_createSession(MNN_Interpreter* net, const MNN_ScheduleConfig* config);
void MNN_Interpreter_releaseSession(MNN_Interpreter* net, MNN_Session* session);
void MNN_Interpreter_resizeSession(MNN_Interpreter* net, MNN_Session* session);
int MNN_Interpreter_runSession(MNN_Interpreter* net, MNN_Session* session);
MNN_Tensor* MNN_Interpreter_getSessionInput(MNN_Interpreter* net, MNN_Session* session, const char* name);
MNN_Tensor* MNN_Interpreter_getSessionOutput(MNN_Interpreter* net, MNN_Session* session, const char* name);
MNN_TensorInfo* MNN_Interpreter_getSessionInputAll(MNN_Interpreter* net, MNN_Session* session, int* size);
MNN_TensorInfo* MNN_Interpreter_getSessionOutputAll(MNN_Interpreter* net, MNN_Session* session, int* size);
void MNN_Interpreter_resizeTensor(MNN_Interpreter* net, MNN_Tensor* tensor, const int* dims, int size);
MNN_Tensor* MNN_Tensor_create(int dims, const int* shape, int type);
MNN_Tensor* MNN_Tensor_createHostTensorFromDevice(const MNN_Tensor* device, int copy);
void MNN_Tensor_destroy(MNN_Tensor* tensor);
int MNN_Tensor_copyFromHostTensor(MNN_Tensor* dst, const MNN_Tensor* src);
int MNN_Tensor_copyToHostTensor(const MNN_Tensor* src, MNN_Tensor* dst);
void* MNN_Tensor_getHost(const MNN_Tensor* tensor);
const int* MNN_Tensor_getDimensions(const MNN_Tensor* tensor, int* size);
int MNN_Tensor_wait(MNN_Tensor* tensor, MNN_Tensor_MapType type, int finish);
#ifdef __cplusplus
}
#endif
#endif