*/
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);