* limitations under the License.
*/
+/**
+ * @file nnfw.h
+ * @brief This file describes runtime API
+ */
#ifndef __NNFW_H__
#define __NNFW_H__
#endif
/**
- * nnfw_session is session to query with runtime
+ * @brief Session to query with runtime
*
* <p>nnfw_session is started and passed by calling {@link nnfw_create_session}.
* Each session has its own inference environment, such as model to inference, backend usage, etc.
typedef struct nnfw_session nnfw_session;
/**
- * Tensor types
+ * @brief Tensor types
*
* The type of tensor represented in {@link nnfw_tensorinfo}
*/
} NNFW_TYPE;
/**
- * Result Values
+ * @brief Result Values
*/
typedef enum {
/** Successful */
} NNFW_STATUS;
/**
- * Data format of a tensor
+ * @brief Data format of a tensor
*/
typedef enum {
/** Don't care layout */
} NNFW_LAYOUT;
/**
- * tensor_info describes the type and shape of tensors
+ * @brief tensor info describes the type and shape of tensors
*
* <p>This structure is used to describe input and output tensors.
* Application can get input and output tensor type and shape described in model by using
} nnfw_tensorinfo;
/**
- * Create a new session instance.
+ * @brief Create a new session instance.
*
* <p>This only creates a session.
* Model is loaded after {@link nnfw_load_model_from_file} is invoked.
* if session is no longer need
*
* @param[out] session The session to be created
- * @return @c NNFW_STATUS_NO_ERROR if successful
+ * @return NNFW_STATUS_NO_ERROR if successful
*/
NNFW_STATUS nnfw_create_session(nnfw_session **session);
/**
- * Close a session instance
+ * @brief Close a session instance
*
* After called, access to closed session by application will be invalid
*
/**
* @brief Apply i-th input's tensor info to resize input tensor
*
- * This function should be called before {@link nnfw_prepare} is invoked, and
- * should be called after {@link nnfw_load_model_from_file} is invoked
- * See {@link nnfw_prepare} for information applying updated tensor info
- * If this function is called many times for same index, tensor info is overwritten
+ * This function should be called before {@link nnfw_prepare} is invoked, and
+ * should be called after {@link nnfw_load_model_from_file} is invoked
+ * See {@link nnfw_prepare} for information applying updated tensor info
+ * If this function is called many times for same index, tensor info is overwritten
*
* @param[in] session Session to the input tensor info is to be set
* @param[in] index Index of input to be applied (0-indexed)
/**
* @brief Prepare session to be ready for inference
*
- * This phase may finalize model compilation, scheduling, and additional settings.
- * If {@link nnfw_apply_tensor} is called to apply input tensor info different with model
- * before this function, tries to resize all tensors.
+ * This phase may finalize model compilation, scheduling, and additional settings.
+ * If {@link nnfw_apply_tensor} is called to apply input tensor info different with model
+ * before this function, tries to resize all tensors.
*
* @param[in] session the session to be prepared
* @return @c NNFW_STATUS_NO_ERROR if successful, otherwise return @c NNFW_STATUS_ERROR
NNFW_STATUS nnfw_output_size(nnfw_session *session, uint32_t *number);
/**
- * Set the layout of an input
- * @note The input that does not call this has NNFW_LAYOUT_NHWC layout
+ * @brief Set the layout of an input
+ *
+ * The input that does not call this has NNFW_LAYOUT_NHWC layout
*
* @param[in] session session from inference input is to be extracted
* @param[in] index index of input to be set (0-indexed)
NNFW_STATUS nnfw_set_input_layout(nnfw_session *session, uint32_t index, NNFW_LAYOUT layout);
/**
- * Set the layout of an output
- * @note The output that does not call this has NNFW_LAYOUT_NHWC layout
+ * @brief Set the layout of an output
+ *
+ * The output that does not call this has NNFW_LAYOUT_NHWC layout
*
* @param[in] session session from inference output is to be extracted
* @param[in] index index of output to be set (0-indexed)
/**
* @brief Set available backends
*
- * Note: This function should be called before {@link nnfw_prepare} is invoked.
- * Possible backend strings are: "cpu", "acl_cl", "acl_neon", "srcn"
- * Supported backends differs on each platforms.
- * For example, `x86_64` supports "cpu" only.
- * Can set multiple backends by semicolon (ex: "acl_cl;cpu").
- * Among the multiple backends, the 1st element is used as default backend.
+ * This function should be called before {@link nnfw_prepare} is invoked.
+ *
+ * <p>Supported backends differs on each platforms.
+ * For example, `x86_64` supports "cpu" only.
+ * Can set multiple backends by semicolon (ex: "acl_cl;cpu").
+ * Among the multiple backends, the 1st element is used as default backend.</p>
+ *
+ * @note Possible backend strings are: "cpu", "acl_cl", "acl_neon", "srcn"
*
* @param[in] session session to which avilable backends are set
* @param[in] backends available backends on which nnfw uses
/**
* @brief Set the operation's backend
*
- * Note: This function should be called before {@link nnfw_prepare} is invoked.
- * Possible backend strings are: "cpu", "acl_cl", "acl_neon"
- * Supported backends differs on each platforms.
- * For example, `x86_64` supports "cpu" only.
- * The backend for op has higher priority than default backend specified by
- * nnfw_set_default_backend.
+ * This function should be called before {@link nnfw_prepare} is invoked.
+ *
+ * <p>Supported backends differs on each platforms.
+ * For example, `x86_64` supports "cpu" only.
+ * The backend for op has higher priority than default backend specified by
+ * nnfw_set_default_backend.</p>
+ *
+ * @note Possible backend strings are: "cpu", "acl_cl", "acl_neon"
*
* @param[in] session session to be modified
* @param[in] op operation to be set