tensorflow/lite/g3doc/api_docs/c/group/delegate-plugin.html
C API types for TF Lite delegate plugins.
|
|
| --- |
| TfLiteDelegatePlugin | typedef
struct TfLiteDelegatePlugin
Struct to hold all the methods for a delegate plugin.
|
| TfLiteDelegatePluginCreateFunc(const void *tflite_settings) | typedef
TfLiteDelegate *
Type of delegate creation function used to allocate and construct a delegate.
|
| TfLiteDelegatePluginDestroyFunc(TfLiteDelegate *) | typedef
void
Type of function to destroy and deallocate a delegate.
|
| TfLiteDelegatePluginGetDelegateErrnoFunc(TfLiteDelegate *) | typedef
int
Type of function to return an error code for the last delegate operation.
|
| TfLiteOpaqueDelegatePlugin | typedef
TfLiteDelegatePlugin
|
| TfLiteOpaqueDelegatePluginCreateFunc | typedef
TfLiteDelegatePluginCreateFunc
|
| TfLiteOpaqueDelegatePluginDestroyFunc | typedef
TfLiteDelegatePluginDestroyFunc
|
| TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc | typedef
TfLiteDelegatePluginGetDelegateErrnoFunc
|
|
| | --- | | TfLiteDelegatePlugin |
Struct to hold all the methods for a delegate plugin.
|
struct[TfLiteDelegatePlugin](/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin)TfLiteDelegatePlugin
Struct to hold all the methods for a delegate plugin.
[TfLiteDelegate](/lite/api_docs/c/struct/tf-lite-delegate.html#struct_tf_lite_delegate)* TfLiteDelegatePluginCreateFunc(const void *tflite_settings)
Type of delegate creation function used to allocate and construct a delegate.
The tflite_settings parameter passed to the delegate creation function should be a pointer to a FlatBuffer table object of type tflite::TFLiteSettings. We use const void * here rather than const tflite::TFLiteSettings* since this is a C API so we don't want to directly reference C++ types such as tflite::TFLiteSettings. But note that this address should point to the 'parsed' FlatBuffer object, not the raw byte buffer. (Note that 'parsing' FlatBuffers is very cheap, it's just an offset load.)
If you are using the FlatBuffers C API, then you can alternatively pass in a value of type tflite_TFLiteSettings_table_t, which is a typedef for const struct tflite_TFLiteSettings_table* that is the corresponding type for the 'parsed' FlatBuffer object in the FlatBuffers C API.
Ownership of the tflite_settings flatbuffer remains with the caller. The caller of a delegate creation function may end the lifetime of the tflite_settings FlatBuffer immediately after the call to the function. So the delegate creation function should ensure that any settings that the delegate may need to reference later, after the delegate has been constructed, are copied from the FlatBuffer into storage owned by the delegate.
void TfLiteDelegatePluginDestroyFunc(TfLiteDelegate *)
Type of function to destroy and deallocate a delegate.
The delegate argument must have been created with the corresponding create function from the same delegate plugin.
int TfLiteDelegatePluginGetDelegateErrnoFunc(TfLiteDelegate *)
Type of function to return an error code for the last delegate operation.
The delegate argument must have been created with the corresponding create function from the same delegate plugin.
[TfLiteDelegatePlugin](/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin)TfLiteOpaqueDelegatePlugin
[TfLiteDelegatePluginCreateFunc](/lite/api_docs/c/group/delegate-plugin.html#group __delegate__ plugin_1ga3688949cd80282bac66e3e8e1c118ca1)TfLiteOpaqueDelegatePluginCreateFunc
[TfLiteDelegatePluginDestroyFunc](/lite/api_docs/c/group/delegate-plugin.html#group __delegate__ plugin_1ga56c8ce15c6841dc756d4295f19c92c7f)TfLiteOpaqueDelegatePluginDestroyFunc
[TfLiteDelegatePluginGetDelegateErrnoFunc](/lite/api_docs/c/group/delegate-plugin.html#group __delegate__ plugin_1ga843989c081ce4f553578baea93858b1e)TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc