[runtime/api] Update I/O buffer set function comment (#9322)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 2 Dec 2019 07:24:27 +0000 (16:24 +0900)
committer이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Mon, 2 Dec 2019 07:24:27 +0000 (16:24 +0900)
- Fix doxygen format
- Add more comment for nnfw_set_input and nnfw_set_output

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtime/neurun/api/include/nnfw.h

index b41239e..2dcc219 100644 (file)
@@ -198,33 +198,37 @@ NNFW_STATUS nnfw_prepare(nnfw_session *session);
  */
 NNFW_STATUS nnfw_run(nnfw_session *session);
 
-/*
- * Set input
+/**
+ * @brief     Set input buffer
  *
- * @param[in] session session to the input is to be set
- * @param[in] index index of input to be set (0-indexed)
- * @param[in] type type of the input
- * @param[in] buffer raw buffer for input
- * @param[in] length size of bytes of output
+ * This function should be called after {@link nnfw_prepare}, and before first inference
+ * on session by {@link nnfw_run}. Application can reuse buffer for many inferences.
  *
- * @return NNFW_STATUS_NO_ERROR if successful
+ * @param[in] session Session to the input is to be set
+ * @param[in] index   Index of input to be set (0-indexed)
+ * @param[in] type    Type of the input
+ * @param[in] buffer  Raw buffer for input
+ * @param[in] length  Size of bytes of input buffer
+ *
+ * @return    @c NNFW_STATUS_NO_ERROR if successful
  */
-
 NNFW_STATUS nnfw_set_input(nnfw_session *session, uint32_t index, NNFW_TYPE type,
                            const void *buffer, size_t length);
 
-/*
- * Set output
+/**
+ * @brief       Set output buffer
  *
- * @param[in] session session from inference output is to be extracted
- * @param[in] index index of output to be set (0-indexed)
- * @param[in] type type of the output
- * @param[out] buffer raw buffer for output
- * @param[in] length size of bytes of output
+ * This function should be called after {@link nnfw_prepare}, and before first inference
+ * on session by {@link nnfw_run}. Application can reuse buffer for many inferences.
  *
- * @return NNFW_STATUS_NO_ERROR if successful
+ * @param[in]   session Session from inference output is to be extracted
+ * @param[in]   index   Index of output to be set (0-indexed)
+ * @param[in]   type    Type of the output
+ * @param[out]  buffer  Raw buffer for output
+ * @param[in]   length  Size of bytes of output buffer
+ *
+ * @return      @c NNFW_STATUS_NO_ERROR if successful
  */
-
 NNFW_STATUS nnfw_set_output(nnfw_session *session, uint32_t index, NNFW_TYPE type, void *buffer,
                             size_t length);