nn_engine_init

Function nn_engine_init 

Source
pub unsafe extern "C" fn nn_engine_init(
    memory: *mut c_void,
) -> *mut NNEngine
Expand description

Initializes the NNEngine structure using the provided memory or allocating a new buffer is none was provided.

When providing memory it must be at least the size returned by @ref nn_engine_sizeof() and for statically initiallized arrays the @ref NN_ENGINE_SIZEOF can be used instead which is padded for future API extensions.

@note previous to version 2.4.32 the memory parameter is required otherwise NULL will always be returned and no engine structure is created.

@param memory Pointer to the start of where a NNEngine object should be initialized.

@return Pointer to the initialized NNEngine structure. @return NULL if memory was NULL and malloc using @ref nn_engine_size() returns NULL.

@public @memberof NNEngine @since 2.0