spandsp 0.0.6
vector_float.c File Reference
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "floating_fudge.h"
#include "mmx_sse_decs.h"
#include "spandsp/telephony.h"
#include "spandsp/vector_float.h"

Macros

#define LMS_LEAK_RATE   0.9999f
 

Functions

void vec_copyf (float z[], const float x[], int n)
 
void vec_copy (double z[], const double x[], int n)
 
void vec_negatef (float z[], const float x[], int n)
 
void vec_negate (double z[], const double x[], int n)
 
void vec_zerof (float z[], int n)
 
void vec_zero (double z[], int n)
 
void vec_setf (float z[], float x, int n)
 
void vec_set (double z[], double x, int n)
 
void vec_addf (float z[], const float x[], const float y[], int n)
 
void vec_add (double z[], const double x[], const double y[], int n)
 
void vec_scaledxy_addf (float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
 
void vec_scaledxy_add (double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
 
void vec_scaledy_addf (float z[], const float x[], const float y[], float y_scale, int n)
 
void vec_scaledy_add (double z[], const double x[], const double y[], double y_scale, int n)
 
void vec_subf (float z[], const float x[], const float y[], int n)
 
void vec_sub (double z[], const double x[], const double y[], int n)
 
void vec_scaledxy_subf (float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
 
void vec_scaledxy_sub (double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
 
void vec_scalar_mulf (float z[], const float x[], float y, int n)
 
void vec_scalar_mul (double z[], const double x[], double y, int n)
 
void vec_scalar_addf (float z[], const float x[], float y, int n)
 
void vec_scalar_add (double z[], const double x[], double y, int n)
 
void vec_scalar_subf (float z[], const float x[], float y, int n)
 
void vec_scalar_sub (double z[], const double x[], double y, int n)
 
void vec_mulf (float z[], const float x[], const float y[], int n)
 
void vec_mul (double z[], const double x[], const double y[], int n)
 
float vec_dot_prodf (const float x[], const float y[], int n)
 Find the dot product of two float vectors. More...
 
double vec_dot_prod (const double x[], const double y[], int n)
 Find the dot product of two double vectors. More...
 
float vec_circular_dot_prodf (const float x[], const float y[], int n, int pos)
 Find the dot product of two float vectors, where the first is a circular buffer with an offset for the starting position. More...
 
void vec_lmsf (const float x[], float y[], int n, float error)
 
void vec_circular_lmsf (const float x[], float y[], int n, int pos, float error)
 

Function Documentation

◆ vec_circular_dot_prodf()

float vec_circular_dot_prodf ( const float  x[],
const float  y[],
int  n,
int  pos 
)

Find the dot product of two float vectors, where the first is a circular buffer with an offset for the starting position.

Parameters
xThe first vector.
yThe first vector.
nThe number of elements in the vectors.
posThe starting position in the x vector.
Returns
The dot product of the two vectors.

References vec_dot_prodf().

◆ vec_dot_prod()

double vec_dot_prod ( const double  x[],
const double  y[],
int  n 
)

Find the dot product of two double vectors.

Parameters
xThe first vector.
yThe first vector.
nThe number of elements in the vectors.
Returns
The dot product of the two vectors.

◆ vec_dot_prodf()

float vec_dot_prodf ( const float  x[],
const float  y[],
int  n 
)

Find the dot product of two float vectors.

Parameters
xThe first vector.
yThe first vector.
nThe number of elements in the vectors.
Returns
The dot product of the two vectors.

Referenced by vec_circular_dot_prodf().