{
gchar *name; /**< Name of the neural network framework, searchable by FRAMEWORK property */
gboolean allow_in_place; /**< TRUE if InPlace transfer of input-to-output is allowed. Not supported in main, yet */
- int (*invoke_NN)(GstTensor_Filter *filter, uint8_t *inputptr, uint8_t *outputptr); /**< Mandatory callback. Invoke the given network model. */
- int (*getInputDimension)(GstTensor_Filter *filter, uint32_t *inputDimension, tensor_type *type); /**< Optional. Set NULL if not supported. Get dimension of input tensor */
- int (*getOutputDimension)(GstTensor_Filter *filter, uint32_t *outputDimension, tensor_type *type); /**< Optional. Set NULL if not supported. Get dimension of output tensor */
+ int (*invoke_NN)(GstTensor_Filter *filter, const uint8_t *inputptr, uint8_t *outputptr); /**< Mandatory callback. Invoke the given network model. */
+ int (*getInputDimension)(GstTensor_Filter *filter, tensor_dim inputDimension, tensor_type *type); /**< Optional. Set NULL if not supported. Get dimension of input tensor */
+ int (*getOutputDimension)(GstTensor_Filter *filter, tensor_dim outputDimension, tensor_type *type); /**< Optional. Set NULL if not supported. Get dimension of output tensor */
void (*close)(GstTensor_Filter *filter); /**< Optional. Close this instance! */
};
* @param[out] outptr The output tensor
*/
static int
-custom_invoke (GstTensor_Filter * filter, uint8_t * inptr, uint8_t * outptr)
+custom_invoke (GstTensor_Filter * filter, const uint8_t * inptr,
+ uint8_t * outptr)
{
int retval = custom_loadlib (filter);
internal_data *ptr;
* @brief The optional callback for GstTensor_Filter_Framework
*/
static int
-custom_getInputDim (GstTensor_Filter * filter, uint32_t * inputDimension,
+custom_getInputDim (GstTensor_Filter * filter, tensor_dim inputDimension,
tensor_type * type)
{
int retval = custom_loadlib (filter);
* @brief The optional callback for GstTensor_Filter_Framework
*/
static int
-custom_getOutputDim (GstTensor_Filter * filter, uint32_t * outputDimension,
+custom_getOutputDim (GstTensor_Filter * filter, tensor_dim outputDimension,
tensor_type * type)
{
int retval = custom_loadlib (filter);
* @brief The mandatory callback for GstTensor_Filter_Framework
*/
static int
-tflite_invoke (GstTensor_Filter * filter, uint8_t * inptr, uint8_t * outptr)
+tflite_invoke (GstTensor_Filter * filter, const uint8_t * inptr,
+ uint8_t * outptr)
{
return 0; /* NYI */
}
* @brief The optional callback for GstTensor_Filter_Framework
*/
static int
-tflite_getInputDim (GstTensor_Filter * filter, uint32_t * inputDimension,
+tflite_getInputDim (GstTensor_Filter * filter, tensor_dim inputDimension,
tensor_type * type)
{
/* @TODO fill in *inputDimension (uint32_t[MAX_RANK]), *type */
* @brief The optional callback for GstTensor_Filter_Framework
*/
static int
-tflite_getOutputDim (GstTensor_Filter * filter, uint32_t * outputDimension,
+tflite_getOutputDim (GstTensor_Filter * filter, tensor_dim outputDimension,
tensor_type * type)
{
/* @TODO fill in *outputDimension (uint32_t[MAX_RANK]), *type */
* @param[in] inputPtr pointer to output tensor, size = dim1 x dim2 x dim3 x dim4 x typesize, allocated by caller
*/
typedef int (*NNS_custom_invoke)(void *private_data, const GstTensor_Filter_Properties *prop,
- uint8_t *inputPtr, uint8_t *outputPtr);
+ const uint8_t *inputPtr, uint8_t *outputPtr);
/**
* @brief Custom Filter Class
static int
pt_invoke (void *private_data, const GstTensor_Filter_Properties * prop,
- uint8_t * inptr, uint8_t * outptr)
+ const uint8_t * inptr, uint8_t * outptr)
{
pt_data *data = private_data;
size_t size;