ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
dsps_addc.h File Reference
#include "dsp_err.h"
#include "dsps_addc_platform.h"
Include dependency graph for dsps_addc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define dsps_addc_f32   dsps_addc_f32_ansi

Functions

esp_err_t dsps_addc_f32_ansi (const float *input, float *output, int len, float C, int step_in, int step_out)
 add constant
esp_err_t dsps_addc_f32_ae32 (const float *input, float *output, int len, float C, int step_in, int step_out)

Macro Definition Documentation

◆ dsps_addc_f32

#define dsps_addc_f32   dsps_addc_f32_ansi

Definition at line 62 of file dsps_addc.h.

Function Documentation

◆ dsps_addc_f32_ae32()

esp_err_t dsps_addc_f32_ae32 ( const float * input,
float * output,
int len,
float C,
int step_in,
int step_out )

References C.

◆ dsps_addc_f32_ansi()

esp_err_t dsps_addc_f32_ansi ( const float * input,
float * output,
int len,
float C,
int step_in,
int step_out )

add constant

The function adds constant to the input array x[i*step_out] = y[i*step_in] + C; i=[0..len) The implementation use ANSI C and could be compiled and run on any platform

Parameters
[in]inputinput array
outputoutput array
lenamount of operations for arrays
Cconstant value
step_instep over input array (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_addc_f32_ansi.c.

18{
19 if (NULL == input) {
21 }
22 if (NULL == output) {
24 }
25
26 for (int i = 0 ; i < len ; i++) {
27 output[i * step_out] = input[i * step_in] + C;
28 }
29 return ESP_OK;
30}
#define ESP_ERR_DSP_PARAM_OUTOFRANGE
#define ESP_OK
Definition esp_err.h:23
float C[4][16]
Definition test_mmult.c:22

References C, ESP_ERR_DSP_PARAM_OUTOFRANGE, and ESP_OK.

Referenced by dspm::Mat::operator+=(), and dspm::Mat::operator-=().

Here is the caller graph for this function: