Common
This is a preview of the Modular Inference Engine. It is not publicly available yet and APIs are subject to change.
If you’re interested, please sign up for early access.
#include "modular/c/common.h"
Functions
-
const char *M_version()¶
Gets the Inference Engine version.
- Returns:
A string containing the semantic version of the Inference Engine.
-
M_Status *M_newStatus()¶
Creates a new status object.
- Returns:
A pointer to the new status object. You are responsible for the memory associated with the pointer returned. You can deallocate the memory by calling
M_freeStatus()
.
-
const char *M_getError(const M_Status *status)¶
Gets an error message from the
M_Status
parameter.You should call this only if
M_isError()
is true.- Parameters:
status – The status object for reporting errors and other messages.
- Returns:
A pointer to a null-terminated string containing the error message.
-
int M_isError(const M_Status *status)¶
Checks if status holds an error value.
- Parameters:
status – The status object for reporting errors and other messages.
- Returns:
0
if there is no error,1
otherwise.