Custom tensor processing interface for simple functions. More...
Go to the source code of this file.
Typedefs | |
typedef int(* | NNS_custom_invoke_dynamic) (void *private_data, const GstTensorsInfo *in_info, GstTensorsInfo *out_info, const GstTensorMemory *input, GstTensorMemory *output) |
Invoke the "main function" with flexible input and output. Output tensor memory should be allocated. More... | |
Functions | |
G_BEGIN_DECLS int | NNS_custom_easy_register (const char *modelname, NNS_custom_invoke func, void *data, const GstTensorsInfo *in_info, const GstTensorsInfo *out_info) |
Register the custom-easy tensor function. More... | |
int | NNS_custom_easy_dynamic_register (const char *modelname, NNS_custom_invoke_dynamic func, void *data, const GstTensorsInfo *in_info) |
Register the custom-easy tensor function for dynamic invoke. More... | |
int | NNS_custom_easy_unregister (const char *modelname) |
Unregister the custom-easy tensor function. More... | |
Custom tensor processing interface for simple functions.
GStreamer Tensor_Filter, Customized Module, Easy Mode Copyright (C) 2019 MyungJoo Ham myung joo. ham@s amsu ng.co m
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2.1 of the License.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
How To for NNdevelopers:
Case 1. Provide the function as a shared object for other apps.
Case 2. Define the function in the app.
Note that this does not support flexible dimensions.
To Packagers:
This file is to be packaged as "devel" package for NN developers.
Definition in file tensor_filter_custom_easy.h.
typedef int(* NNS_custom_invoke_dynamic) (void *private_data, const GstTensorsInfo *in_info, GstTensorsInfo *out_info, const GstTensorMemory *input, GstTensorMemory *output) |
Invoke the "main function" with flexible input and output. Output tensor memory should be allocated.
[in/out] | private_data A subplugin may save its internal private data here. The subplugin is responsible for alloc/free of this pointer. | |
[in] | info | structure of input tensors info |
[out] | info | structure of output tensors info. The subplugin should fill this info. |
[in] | input | The array of input tensors. Allocated and filled by tensor_filter/main |
[out] | output | The array of output tensors. The subplugin should allocate the memory block for output tensor. (data in GstTensorMemory) |
Definition at line 76 of file tensor_filter_custom_easy.h.
int NNS_custom_easy_dynamic_register | ( | const char * | modelname, |
NNS_custom_invoke_dynamic | func, | ||
void * | data, | ||
const GstTensorsInfo * | in_info | ||
) |
Register the custom-easy tensor function for dynamic invoke.
[in] | modelname | The name of custom-easy tensor function. |
[in] | func | The tensor function body |
[in/out] | private_data The internal data for the function | |
[in] | in_info | Input tensor metadata. |
Register the custom-easy tensor function for dynamic invoke.
Definition at line 112 of file tensor_filter_custom_easy.c.
G_BEGIN_DECLS int NNS_custom_easy_register | ( | const char * | modelname, |
NNS_custom_invoke | func, | ||
void * | data, | ||
const GstTensorsInfo * | in_info, | ||
const GstTensorsInfo * | out_info | ||
) |
Register the custom-easy tensor function.
[in] | modelname | The name of custom-easy tensor function. |
[in] | func | The tensor function body |
[in/out] | private_data The internal data for the function | |
[in] | in_info | Input tensor metadata. |
[in] | out_info | Output tensor metadata |
Register the custom-easy tensor function.
Definition at line 76 of file tensor_filter_custom_easy.c.
int NNS_custom_easy_unregister | ( | const char * | modelname | ) |
Unregister the custom-easy tensor function.
[in] | modelname | The registered name of custom-easy tensor function. |
Definition at line 144 of file tensor_filter_custom_easy.c.