|
ONE - On-device Neural Engine
|
Go to the source code of this file.
Functions | |
| GGMA_STATUS | ggma_create_context (ggma_context **context, const char *package_path) |
| Creates a context from a package path. | |
| GGMA_STATUS | ggma_free_context (ggma_context *context) |
| Closes a GGMA context and releases its resources. | |
| GGMA_STATUS ggma_create_context | ( | ggma_context ** | context, |
| const char * | package_path | ||
| ) |
Creates a context from a package path.
This function initializes a context for inference from the specified package path. Once the context is no longer needed, it must be destroyed by calling ggma_free_context.
| [out] | context | A pointer to the variable that will receive the new context handle. |
| [in] | package_path | The path to the GGMA package directory. |
GGMA_STATUS_NO_ERROR on success, or an appropriate error code on failure. Definition at line 23 of file ggma_context.cc.
References GGMA_STATUS_ERROR, GGMA_STATUS_NO_ERROR, GGMA_STATUS_OUT_OF_MEMORY, and GGMA_STATUS_UNEXPECTED_NULL.
| GGMA_STATUS ggma_free_context | ( | ggma_context * | context | ) |
Closes a GGMA context and releases its resources.
This function deallocates all resources associated with the context, including the GGMA package it was created with. After this function returns, the context handle is invalid and must not be used.
| [in] | context | The context to close. |
GGMA_STATUS_NO_ERROR on success, or an appropriate error code on failure. Definition at line 46 of file ggma_context.cc.
References GGMA_STATUS_NO_ERROR.