50 int32_t output_operand_index,
const void *parameters)
52 const DnnOperand *input = &operands[input_operand_indexes[0]];
53 DnnOperand *output = &operands[output_operand_index];
59 for (
int i = 0;
i < 4; ++
i)
72 switch (params->
un_op) {
74 for (
int i = 0;
i < dims_count; ++
i)
void * av_realloc(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory.
DNN inference functions interface for native backend.
int32_t calculate_operand_dims_count(const DnnOperand *oprd)
int32_t input_operand_indexes[4]
a layer can have multiple inputs and one output.
DNNMathUnaryOperation un_op
DNNDataType data_type
support different kinds of data type such as float, half float, int8 etc, first support float now...
#define i(width, name, range_min, range_max)
unsigned int avio_rl32(AVIOContext *s)
void * data
data pointer with data length in bytes.
simple assert() macros that are a bit more flexible than ISO C assert().
int32_t dims[4]
there are two memory layouts, NHWC or NCHW, so we use dims, dims[0] is Number.
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size)
DNN inference functions interface for native backend.
int32_t calculate_operand_data_length(const DnnOperand *oprd)
int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters)
int32_t output_operand_index