10esp_err_t dspm_add_f32_ansi(
const float *input1,
const float *input2,
float *output,
int rows,
int cols,
int padd1,
int padd2,
int padd_out,
int step1,
int step2,
int step_out)
49 const int ptr_input1_step = cols + padd1;
50 const int ptr_input2_step = cols + padd2;
51 const int ptr_output_step = cols + padd_out;
52 float *ptr_input1 = (
float *)input1;
53 float *ptr_input2 = (
float *)input2;
55 for (
int row = 0; row < rows; row++) {
56 for (
int col = 0; col < cols; col++) {
57 output[col * step_out] = ptr_input1[col * step1] + ptr_input2[col * step2];
59 ptr_input1 += ptr_input1_step;
60 ptr_input2 += ptr_input2_step;
61 output += ptr_output_step;
esp_err_t dspm_add_f32_ansi(const float *input1, const float *input2, float *output, int rows, int cols, int padd1, int padd2, int padd_out, int step1, int step2, int step_out)
add two arrays with paddings (add two sub-matrices)