From: 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 3 Dec 2019 01:53:31 +0000 (+0900) Subject: [runtime/api] Update input/output info cuntion comment (#9299) X-Git-Tag: submit/tizen/20191205.083104~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=062e8466ea90c5b1fb505c7c6193e285ad6a3e54;p=platform%2Fcore%2Fml%2Fnnfw.git [runtime/api] Update input/output info cuntion comment (#9299) - Fix doxygen format - Add more comment for nnfw_output_size, nnfw_output_tensorinfo Signed-off-by: Hyeongseok Oh --- diff --git a/runtime/neurun/api/include/nnfw.h b/runtime/neurun/api/include/nnfw.h index 730ad4b..6e99f0b 100644 --- a/runtime/neurun/api/include/nnfw.h +++ b/runtime/neurun/api/include/nnfw.h @@ -238,23 +238,29 @@ NNFW_STATUS nnfw_set_input(nnfw_session *session, uint32_t index, NNFW_TYPE type NNFW_STATUS nnfw_set_output(nnfw_session *session, uint32_t index, NNFW_TYPE type, void *buffer, size_t length); -/* - * Get the number of inputs +/** + * @brief Get the number of inputs * - * @param[in] session session from input information is to be extracted - * @param[out] number variable which the number of inputs is put into + * Application can call this function to get number of inputs defined in loaded model. + * This function should be called after {@link nnfw_load_model_from_file} is invoked to load model * - * @return NNFW_STATUS_NO_ERROR if successful + * @param[in] session Session from input information is to be extracted + * @param[out] number Variable which the number of inputs is put into + * + * @return @c NNFW_STATUS_NO_ERROR if successful */ NNFW_STATUS nnfw_input_size(nnfw_session *session, uint32_t *number); -/* - * Get the number of outputs +/** + * @brief Get the number of outputs * - * @param[in] session session from output information is to be extracted - * @param[out] number variable which the number of outputs is put into + * Application can call this function to get number of outputs defined in loaded model. + * This function should be called after {@link nnfw_load_model_from_file} is invoked to load model * - * @return NNFW_STATUS_NO_ERROR if successful + * @param[in] session Session from output information is to be extracted + * @param[out] number Variable which the number of outputs is put into + * + * @return @c NNFW_STATUS_NO_ERROR if successful */ NNFW_STATUS nnfw_output_size(nnfw_session *session, uint32_t *number); @@ -285,28 +291,35 @@ NNFW_STATUS nnfw_set_output_layout(nnfw_session *session, uint32_t index, NNFW_L /** * @brief Get i-th input tensor info * - * Before {@link nnfw_prepare} is invoked, this function return tensor info in model, - * so updated tensor info by {@link nnfw_apply_tensorinfo} is not returned - * After {@link nnfw_prepare} is invoked, this function return updated tensor info - * if tensor info is updated by {@link nnfw_apply_tensorinfo} + *

Before {@link nnfw_prepare} is invoked, this function return tensor info in model, + * so updated tensor info by {@link nnfw_apply_tensorinfo} is not returned.

+ * + *

After {@link nnfw_prepare} is invoked, this function return updated tensor info + * if tensor info is updated by {@link nnfw_apply_tensorinfo}.

* - * @param[in] session session from input information is to be extracted - * @param[in] index index of input - * @param[out] tensor_info nnfw_tensor_info + * @param[in] session Session from input information is to be extracted + * @param[in] index Index of input + * @param[out] tensor_info Tensor info (shape, type, etc) * - * @return @c NNFW_STATUS_NO_ERROR if successful, otherwise return @c NNFW_STATUS_ERROR + * @return @c NNFW_STATUS_NO_ERROR if successful */ NNFW_STATUS nnfw_input_tensorinfo(nnfw_session *session, uint32_t index, nnfw_tensorinfo *tensor_info); -/* - * Get i-th output tensor info +/** + * @brief Get i-th output tensor info * - * @param[in] session session from output information is to be extracted - * @param[in] index index of output - * @param[out] tensor_info nnfw_tensor_info + *

Before {@link nnfw_prepare} is invoked, this function return tensor info in model, + * so updated tensor info by {@link nnfw_apply_tensorinfo} is not returned.

* - * @return NNFW_STATUS_NO_ERROR if successful + *

After {@link nnfw_prepare} is invoked, this function return updated tensor info + * if tensor info is updated by {@link nnfw_apply_tensorinfo}.

+ * + * @param[in] session Session from output information is to be extracted + * @param[in] index Index of output + * @param[out] tensor_info Tensor info (shape, type, etc) + * + * @return @c NNFW_STATUS_NO_ERROR if successful */ NNFW_STATUS nnfw_output_tensorinfo(nnfw_session *session, uint32_t index, nnfw_tensorinfo *tensor_info);