[runtime/api] Update input/output info cuntion comment (#9299)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 3 Dec 2019 01:53:31 +0000 (10:53 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Tue, 3 Dec 2019 01:53:31 +0000 (10:53 +0900)
- Fix doxygen format
- Add more comment for nnfw_output_size, nnfw_output_tensorinfo

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

index 730ad4b..6e99f0b 100644 (file)
@@ -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}
+ * <p>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.</p>
+ *
+ * <p>After {@link nnfw_prepare} is invoked, this function return updated tensor info
+ * if tensor info is updated by {@link nnfw_apply_tensorinfo}.</p>
  *
- * @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
+ * <p>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.</p>
  *
- * @return NNFW_STATUS_NO_ERROR if successful
+ * <p>After {@link nnfw_prepare} is invoked, this function return updated tensor info
+ * if tensor info is updated by {@link nnfw_apply_tensorinfo}.</p>
+ *
+ * @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);