#ifndef RSTRT_WRAPPER_H
#define RSTRT_WRAPPER_H
#include <cstddef>
#include <cstdint>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TrtInfer TrtInfer;
enum TrtIoMode : int32_t {
kTrtIoInput = 1,
kTrtIoOutput = 2,
};
#define TRT_OK 0
#define TRT_ERR_GENERIC 1
#define TRT_ERR_NOT_FOUND 2
#define TRT_ERR_CUDA 3
const char* trt_infer_last_error(void);
TrtInfer* trt_infer_create(const char* engine_path);
void trt_infer_free(TrtInfer* h);
int32_t trt_infer_nb_io(TrtInfer* h);
const char* trt_infer_get_io_name(TrtInfer* h, int32_t i);
int32_t trt_infer_get_io_mode(TrtInfer* h, int32_t i); int32_t trt_infer_get_io_dtype(TrtInfer* h, int32_t i); int32_t trt_infer_get_io_ndims(TrtInfer* h, int32_t i);
int32_t trt_infer_get_io_dims(TrtInfer* h, int32_t i, int64_t* out, int32_t max_len);
int32_t trt_infer_alloc(TrtInfer* h, const char* name, const int64_t* dims, int32_t ndims);
uintptr_t trt_infer_pinned_ptr(TrtInfer* h, const char* name);
int64_t trt_infer_byte_size(TrtInfer* h, const char* name);
int32_t trt_infer_infer(TrtInfer* h);
#ifdef __cplusplus
}
#endif
#endif