Go to the documentation of this file.
80 int32_t output_operand_index,
const void *parameters)
89 for (
int i = 0;
i < 4; ++
i)
107 for (
int i = 0;
i < dims_count; ++
i) {
108 dst[
i] = params->
v -
src[
i];
111 for (
int i = 0;
i < dims_count; ++
i) {
112 dst[
i] =
src[
i] - params->
v;
115 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
117 for (
int i = 0;
i < dims_count; ++
i) {
124 for (
int i = 0;
i < dims_count; ++
i) {
125 dst[
i] = params->
v +
src[
i];
128 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
130 for (
int i = 0;
i < dims_count; ++
i) {
137 for (
int i = 0;
i < dims_count; ++
i) {
138 dst[
i] = params->
v *
src[
i];
141 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
143 for (
int i = 0;
i < dims_count; ++
i) {
150 for (
int i = 0;
i < dims_count; ++
i) {
151 dst[
i] = params->
v /
src[
i];
154 for (
int i = 0;
i < dims_count; ++
i) {
155 dst[
i] =
src[
i] / params->
v;
158 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
160 for (
int i = 0;
i < dims_count; ++
i) {
167 for (
int i = 0;
i < dims_count; ++
i) {
171 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
173 for (
int i = 0;
i < dims_count; ++
i) {
int32_t calculate_operand_data_length(const DnnOperand *oprd)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters)
void * data
data pointer with data length in bytes.
unsigned int avio_rl32(AVIOContext *s)
int32_t output_operand_index
int32_t input_operand_indexes[4]
a layer can have multiple inputs and one output.
int32_t calculate_operand_dims_count(const DnnOperand *oprd)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
void * av_realloc(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory.
#define i(width, name, range_min, range_max)
DNNMathBinaryOperation bin_op