ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
dsps_sub_f32_ansi.c File Reference
#include "dsps_sub.h"
Include dependency graph for dsps_sub_f32_ansi.c:

Go to the source code of this file.

Functions

esp_err_t dsps_sub_f32_ansi (const float *input1, const float *input2, float *output, int len, int step1, int step2, int step_out)
 sub arrays

Function Documentation

◆ dsps_sub_f32_ansi()

esp_err_t dsps_sub_f32_ansi ( const float * input1,
const float * input2,
float * output,
int len,
int step1,
int step2,
int step_out )

sub arrays

The function subtract one array from another out[i*step_out] = input1[i*step1] - input2[i*step2]; i=[0..len) The implementation use ANSI C and could be compiled and run on any platform

Parameters
[in]input1input array 1
[in]input2input array 2
outputoutput array
lenamount of operations for arrays
step1step over input array 1 (by default should be 1)
step2step over input array 2 (by default should be 1)
step_outstep over output array (by default should be 1)
Returns
  • ESP_OK on success
  • One of the error codes from DSP library

Definition at line 17 of file dsps_sub_f32_ansi.c.

18{
19 if (NULL == input1) {
21 }
22 if (NULL == input2) {
24 }
25 if (NULL == output) {
27 }
28
29 for (int i = 0 ; i < len ; i++) {
30 output[i * step_out] = input1[i * step1] - input2[i * step2];
31 }
32 return ESP_OK;
33}
#define ESP_ERR_DSP_PARAM_OUTOFRANGE
#define ESP_OK
Definition esp_err.h:23

References ESP_ERR_DSP_PARAM_OUTOFRANGE, and ESP_OK.