clean code

This commit is contained in:
liuchengju
2020-09-01 12:24:26 +08:00
parent 5c08175305
commit 71a48df4ae
+40 -40
View File
@@ -9,9 +9,9 @@
*/ */
#ifndef _MODEL_PROCESS_H_ #ifndef _MODEL_PROCESS_H_
#define _MODEL_PROCESS_H_ #define _MODEL_PROCESS_H_
#include <string>
#include "acl/acl.h" #include "acl/acl.h"
#include "utils.h" #include "utils.h"
#include <string>
/** /**
* ModelProcess * ModelProcess
@@ -19,87 +19,87 @@
class ModelProcess { class ModelProcess {
public: public:
/** /**
* @brief Constructor * @brief Constructor
*/ */
ModelProcess(); ModelProcess();
/** /**
* @brief Destructor * @brief Destructor
*/ */
~ModelProcess(); ~ModelProcess();
/** /**
* @brief load model from file with mem * @brief load model from file with mem
* @param [in] modelPath: model path * @param [in] modelPath: model path
* @return result * @return result
*/ */
Result LoadModelFromFileWithMem(const std::string& modelPath); Result LoadModelFromFileWithMem(const std::string& modelPath);
/** /**
* @brief unload model * @brief unload model
*/ */
void Unload(); void Unload();
/** /**
* @brief create model desc * @brief create model desc
* @return result * @return result
*/ */
Result CreateDesc(); Result CreateDesc();
/** /**
* @brief PrintDesc * @brief PrintDesc
*/ */
Result PrintDesc(); Result PrintDesc();
/** /**
* @brief destroy desc * @brief destroy desc
*/ */
void DestroyDesc(); void DestroyDesc();
/** /**
* @brief create model input * @brief create model input
* @param [in] inputDataBuffer: input buffer * @param [in] inputDataBuffer: input buffer
* @param [in] bufferSize: input buffer size * @param [in] bufferSize: input buffer size
* @return result * @return result
*/ */
Result CreateInput(void* inputDataBuffer, size_t bufferSize); Result CreateInput(void* inputDataBuffer, size_t bufferSize);
/** /**
* @brief create model input * @brief create model input
* @return result * @return result
*/ */
Result CreateZeroInput(); Result CreateZeroInput();
/** /**
* @brief destroy input resource * @brief destroy input resource
*/ */
void DestroyInput(); void DestroyInput();
/** /**
* @brief create output buffer * @brief create output buffer
* @return result * @return result
*/ */
Result CreateOutput(); Result CreateOutput();
/** /**
* @brief destroy output resource * @brief destroy output resource
*/ */
void DestroyOutput(); void DestroyOutput();
/** /**
* @brief model execute * @brief model execute
* @return result * @return result
*/ */
Result Execute(); Result Execute();
/** /**
* @brief dump model output result to file * @brief dump model output result to file
*/ */
void DumpModelOutputResult(); void DumpModelOutputResult();
/** /**
* @brief get model output result * @brief get model output result
*/ */
void OutputModelResult(std::string& s, std::string& modelName, size_t index); void OutputModelResult(std::string& s, std::string& modelName, size_t index);
private: private: