From a1a63c6f43651a88b6d4cff536e1aa72945c20f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 2 Dec 2019 16:24:27 +0900 Subject: [PATCH] [runtime/api] Update I/O buffer set function comment (#9322) - Fix doxygen format - Add more comment for nnfw_set_input and nnfw_set_output Signed-off-by: Hyeongseok Oh --- runtime/neurun/api/include/nnfw.h | 40 +++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/runtime/neurun/api/include/nnfw.h b/runtime/neurun/api/include/nnfw.h index b41239e..2dcc219 100644 --- a/runtime/neurun/api/include/nnfw.h +++ b/runtime/neurun/api/include/nnfw.h @@ -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); -- 2.7.4