#include "mlp.h" mlp_library::mlp_library(mlp_context *ctx, mlp_runtime *rt, const char *name, const void *opts) : rt(rt), name(name == NULL ? "" : name){ } mlp_library::~mlp_library(){ } const char *mlp_library::get_name(mlp_context *ctx){ return name.c_str() ; } MLP_EXTERN_C void mlp_library_get_name(mlp_context *ctx, mlp_library *lib){ lib->get_name(ctx) ; } mlp_runtime *mlp_library::get_runtime(mlp_context *ctx){ return rt ; } MLP_EXTERN_C mlp_runtime *mlp_library_get_runtime(mlp_context *ctx, mlp_library *lib){ lib->get_runtime(ctx) ; } void mlp_library::destroy(mlp_context *ctx){ delete this ; } MLP_EXTERN_C void mlp_library_destroy(mlp_context *ctx, mlp_library *lib){ lib->destroy(ctx) ; }