mmdeploy/csrc/apis/c/model.h
lvhan028 d79413fa32
update c-api's comments by following doxygen's guide (#336)
* update c-api's comments by following doxygen's guide

* fix according to review comments
2021-12-24 18:43:26 +08:00

38 lines
1.2 KiB
C

// Copyright (c) OpenMMLab. All rights reserved.
/**
* @file model.h
* @brief Interface to MMDeploy SDK Model
*/
#ifndef MMDEPLOY_SRC_APIS_C_MODEL_H_
#define MMDEPLOY_SRC_APIS_C_MODEL_H_
#include "common.h"
/**
* @brief Create SDK Model instance from given model path
* @param[in] path model path
* @param[out] model sdk model instance that must be destroyed by \ref mmdeploy_model_destroy
* @return status code of the operation
*/
MM_SDK_API int mmdeploy_model_create_by_path(const char* path, mm_model_t* model);
/**
* @brief Create SDK Model instance from memory
* @param[in] buffer a linear buffer contains the model information
* @param[in] size size of \p buffer in bytes
* @param[out] model sdk model instance that must be destroyed by \ref mmdeploy_model_destroy
* @return status code of the operation
*/
MM_SDK_API int mmdeploy_model_create(const void* buffer, int size, mm_model_t* model);
/**
* @brief Destroy model instance
* @param[in] model sdk model instance created by \ref mmdeploy_model_create_by_path or \ref
* mmdeploy_model_create
*/
MM_SDK_API void mmdeploy_model_destroy(mm_model_t model);
#endif // MMDEPLOY_SRC_APIS_C_MODEL_H_