# Atmel Software Framework

DSPLIB - Vectors

All the vector management functions currently supported by the DSP library.

This function adds two vectors and store the result into another one.

Relative functions:

This function adds two vectors and store the result into another one. It takes care of the saturation.

Relative functions:

This function adds each items of a vector with a real number and store the result into another vector.

Relative functions:

# Subtraction

This function subtracts two vectors and store the result into another one.

Relative functions:

# Subtraction with a real

This function subtracts each items of a vector with a real number and store the result into another vector.

Relative functions:

# Multiplication with a real

This function multiplies one vector with a real number and store the result into another vector.

Relative functions:

# Division with a real

This function divides one vector with a real number and store the result into another vector.

Relative functions:

# Multiplication with an integer

This function multiplies one vector with an integer and store the result into another vector.

Relative functions:

# Division with an integer

This function divides one vector with an integer and store the result into another vector.

Relative functions:

# Dot multiplication

This function multiplies two vectors point per point and store the result into another one.

Relative functions:

# Dot division

This function divides two vectors point per point and store the result into another one.

Relative functions:

# Power

These functions compute vect2^real.

Note
The output will be limit in the range of the fixed point format used.

Relative functions:

# Minimum

This function retrieves the minimum of a vector.

Relative functions:

# Maximum

This function retrieves the maximum of a vector.

Relative functions:

# Negate

This function negate a vector.

Relative functions:

This function zero pads the tail of the vector.

Relative functions:

# Copy

This function copy a vector into another vector.

Relative functions:

# Partial Convolution

This function performs a linear partial convolution between two discrete sequences. It returns a signal of a length equals to (vect2_size - vect3_size + 1) elements.

Note
The two discrete sequences have to be scaled to avoid overflowing values.
All the vectors have to be 32-bits aligned.

Relative functions:

# Convolution

This function performs a linear convolution between two discrete sequences. It returns a signal of a length equals to (vect2_size + vect3_size - 1) elements.

Note
The two discrete sequences have to be scaled to avoid overflowing values.
All the vectors have to be 32-bits aligned.
Warning
The output buffer of the function has to have at least a length of N + 2*M - 2 elements because of internal computations, where N is the length of the largest input buffer and M, the length of the smallest input buffer.

Relative functions:

This function add two complex vectors and store the result into another one.

Relative functions:

# Complex subtraction

This function sub two complex vectors and store the result into another one.

Relative functions:

# Complex absolute

This function returns the absolute value of a complex vector.

Relative functions:

# Complex conjugate

This function returns the conjugate complex vector of the input.

Relative functions:

## Functions

void dsp16_vect_add (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size)
16-bit fixed point version of the vector addition function. More...

void dsp16_vect_add_and_sat (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size)
16-bit fixed point version of the vector addition function. More...

void dsp16_vect_complex_abs (dsp16_t *vect1, dsp16_complex_t *vect2, int size)
16-bit fixed point version of the complex vector absolute function. More...

void dsp16_vect_complex_add (dsp16_complex_t *vect1, dsp16_complex_t *vect2, dsp16_complex_t *vect3, int size)
16-bit fixed point version of the complex vector addition function. More...

void dsp16_vect_complex_conj (dsp16_complex_t *vect1, dsp16_complex_t *vect2, int size)
16-bit fixed point version of the complex vector conjugate function. More...

void dsp16_vect_complex_sub (dsp16_complex_t *vect1, dsp16_complex_t *vect2, dsp16_complex_t *vect3, int size)
16-bit fixed point version of the complex vector subtraction function. More...

void dsp16_vect_conv (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *vect3, int vect3_size)
16-bit fixed point version of the Convolution. More...

void dsp16_vect_convpart (dsp16_t *vect1, dsp16_t *vect2, int vect2_size, dsp16_t *vect3, int vect3_size)
16-bit fixed point version of the Partial Convolution. More...

static void dsp16_vect_copy (dsp16_t *vect1, dsp16_t *vect2, int size)
16-bit fixed point version of the copy function. More...

void dsp16_vect_dotdiv (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size)
16-bit fixed point version of the vector dot division function. More...

void dsp16_vect_dotmul (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size)
16-bit fixed point version of the vector dot multiplication function. More...

void dsp16_vect_intdiv (dsp16_t *vect1, dsp16_t *vect2, int size, int integer)
16-bit fixed point version of the vector division with an integer. More...

void dsp16_vect_intmul (dsp16_t *vect1, dsp16_t *vect2, int size, int integer)
16-bit fixed point version of the vector multiplication with an integer. More...

dsp16_t dsp16_vect_max (dsp16_t *vect1, int size)
16-bit fixed point version of the vector maximum function. More...

dsp16_t dsp16_vect_min (dsp16_t *vect1, int size)
16-bit fixed point version of the vector minimum function. More...

void dsp16_vect_neg (dsp16_t *vect1, dsp16_t *vect2, int size)
16-bit fixed point version of the vector negate function. More...

void dsp16_vect_pow (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
16-bit fixed point version of the power function. More...

void dsp16_vect_realadd (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
16-bit fixed point version of the vector addition with a real number. More...

void dsp16_vect_realdiv (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
16-bit fixed point version of the vector division with a real number. More...

void dsp16_vect_realmul (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
16-bit fixed point version of the vector multiplication with a real number. More...

void dsp16_vect_realsub (dsp16_t *vect1, dsp16_t *vect2, int size, dsp16_t real)
16-bit fixed point version of the vector subtraction with a real number. More...

void dsp16_vect_sub (dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3, int size)
16-bit fixed point version of the vector subtraction function. More...

static void dsp16_vect_zeropad (dsp16_t *vect1, int size, int num_zero)
16-bit fixed point version of the zero padding function. More...

void dsp32_vect_add (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size)
32-bit fixed point version of the vector addition function. More...

void dsp32_vect_add_and_sat (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size)
32-bit fixed point version of the vector addition function. More...

void dsp32_vect_complex_abs (dsp32_t *vect1, dsp32_complex_t *vect2, int size)
32-bit fixed point version of the complex vector absolute function. More...

void dsp32_vect_complex_add (dsp32_complex_t *vect1, dsp32_complex_t *vect2, dsp32_complex_t *vect3, int size)
32-bit fixed point version of the complex vector addition function. More...

void dsp32_vect_complex_sub (dsp32_complex_t *vect1, dsp32_complex_t *vect2, dsp32_complex_t *vect3, int size)
32-bit fixed point version of the complex vector subtraction function. More...

void dsp32_vect_conv (dsp32_t *vect1, dsp32_t *vect2, int vect2_size, dsp32_t *vect3, int vect3_size)
32-bit fixed point version of the Convolution. More...

void dsp32_vect_convpart (dsp32_t *vect1, dsp32_t *vect2, int vect2_size, dsp32_t *vect3, int vect3_size)
32-bit fixed point version of the Partial Convolution. More...

static void dsp32_vect_copy (dsp32_t *vect1, dsp32_t *vect2, int size)
32-bit fixed point version of the copy function. More...

void dsp32_vect_dotdiv (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size)
32-bit fixed point version of the vector dot division function. More...

void dsp32_vect_dotmul (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size)
32-bit fixed point version of the vector dot multiplication function. More...

void dsp32_vect_intdiv (dsp32_t *vect1, dsp32_t *vect2, int size, int integer)
32-bit fixed point version of the vector division with an integer. More...

void dsp32_vect_intmul (dsp32_t *vect1, dsp32_t *vect2, int size, int integer)
32-bit fixed point version of the vector multiplication with an integer. More...

dsp32_t dsp32_vect_max (dsp32_t *vect1, int size)
32-bit fixed point version of the vector maximum function. More...

dsp32_t dsp32_vect_min (dsp32_t *vect1, int size)
32-bit fixed point version of the vector minimum function. More...

void dsp32_vect_neg (dsp32_t *vect1, dsp32_t *vect2, int size)
32-bit fixed point version of the vector negate function. More...

void dsp32_vect_pow (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real)
32-bit fixed point version of the power function. More...

void dsp32_vect_realadd (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real)
32-bit fixed point version of the vector addition with a real number. More...

void dsp32_vect_realdiv (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real)
32-bit fixed point version of the vector division with a real number. More...

void dsp32_vect_realmul (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real)
32-bit fixed point version of the vector multiplication with a real number. More...

void dsp32_vect_realsub (dsp32_t *vect1, dsp32_t *vect2, int size, dsp32_t real)
32-bit fixed point version of the vector subtraction with a real number. More...

void dsp32_vect_sub (dsp32_t *vect1, dsp32_t *vect2, dsp32_t *vect3, int size)
32-bit fixed point version of the vector subtraction function. More...

static void dsp32_vect_zeropad (dsp32_t *vect1, int size, int num_zero)
32-bit fixed point version of the zero padding function. More...

 void dsp16_vect_add ( dsp16_t * vect1, dsp16_t * vect2, dsp16_t * vect3, int size )

16-bit fixed point version of the vector addition function.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the addition. vect2 A pointer on the 16-bit real vector that will be added with the other input vector (vect3). vect3 A pointer on the 16-bit real vector that will be added with the other input vector (vect2). size The size of the input buffers.

References n.

 void dsp16_vect_add_and_sat ( dsp16_t * vect1, dsp16_t * vect2, dsp16_t * vect3, int size )

16-bit fixed point version of the vector addition function.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the addition. vect2 A pointer on the 16-bit real vector that will be added with the other input vector (vect3). vect3 A pointer on the 16-bit real vector that will be added with the other input vector (vect2). size The size of the input buffers.

 void dsp16_vect_complex_abs ( dsp16_t * vect1, dsp16_complex_t * vect2, int size )

16-bit fixed point version of the complex vector absolute function.

Parameters
 vect1 A pointer on the 16-bit real vector that will receive the result. vect2 A pointer on the 16-bit complex vector that will be computed. size The size of the input buffer.

References DSP16_COMPLEX_ABS, dsp16_vect_complex_abs_kernel_x0(), and n.

Referenced by dsp_calculate_fft(), and main().

 void dsp16_vect_complex_add ( dsp16_complex_t * vect1, dsp16_complex_t * vect2, dsp16_complex_t * vect3, int size )

16-bit fixed point version of the complex vector addition function.

Parameters
 vect1 A pointer on the 16-bit complex vector that will received the result of the addition. vect2 A pointer on the 16-bit complex vector that will be added with the other input vector (vect3). vect3 A pointer on the 16-bit complex vector that will be added with the other input vector (vect2). size The size of the input buffers.

 void dsp16_vect_complex_conj ( dsp16_complex_t * vect1, dsp16_complex_t * vect2, int size )

16-bit fixed point version of the complex vector conjugate function.

Parameters
 vect1 A pointer on the 16-bit complex vector that will receive the result. vect2 A pointer on the 16-bit complex vector that will be computed. size The size of the input buffer.

References DSP16_COMPLEXCONJUGATE, dsp16_vect_complexconj_kernel_x0(), n, and temp.

Referenced by dsp16_trans_complexifft().

 void dsp16_vect_complex_sub ( dsp16_complex_t * vect1, dsp16_complex_t * vect2, dsp16_complex_t * vect3, int size )

16-bit fixed point version of the complex vector subtraction function.

Parameters
 vect1 A pointer on the 16-bit complex vector that will received the result of the subtraction. vect2 A pointer on the 16-bit complex vector that will be subtracted with the other input vector (vect3). vect3 A pointer on the 16-bit complex vector that will be subtracted with the other input vector (vect2). size The size of the input buffers.

References DSP16_COMPLEXSUBITION, and n.

 void dsp16_vect_conv ( dsp16_t * vect1, dsp16_t * vect2, int vect2_size, dsp16_t * vect3, int vect3_size )

16-bit fixed point version of the Convolution.

Parameters
 vect1 A pointer on a 16-bits fixed-point vector corresponding to the output buffer. vect2 A pointer on a 16-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. vect2_size The length of the first input buffer (must be greater or equals to 8). vect3 A pointer on a 16-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. vect3_size The length of the second input buffer (must be greater or equals to 8)
Warning
Due to its implementation, for the avr32-uc3 optimized version of the FIR, the output buffer (vect1) have to have a length of 4*n elements to avoid overflows.
Note
You need the "Partial Convolution" module
the "Copy" module

Referenced by main().

 void dsp16_vect_convpart ( dsp16_t * vect1, dsp16_t * vect2, int vect2_size, dsp16_t * vect3, int vect3_size )

16-bit fixed point version of the Partial Convolution.

Parameters
 vect1 A pointer on a 16-bits fixed-point vector corresponding to the output buffer. vect2 A pointer on a 16-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. vect2_size The length of the first input buffer (must be greater or equals to 4). vect3 A pointer on a 16-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. vect3_size The length of the second input buffer (must be greater or equals to 8)
Warning
Due to its implementation, for the avr32-uc3 optimized version of the FIR, the output buffer (vect1) have to have a length of 4*n elements to avoid overflows.

References vect1, vect2, and vect3.

Referenced by dsp16_filt_fir(), and dsp16_vect_conv().

 static void dsp16_vect_copy ( dsp16_t * vect1, dsp16_t * vect2, int size )
inlinestatic

16-bit fixed point version of the copy function.

Parameters
 vect1 A pointer on the 16 bits real vector that will receive data. vect2 A pointer on the 16 bits real vector to be copied. size The size of those vectors.

Referenced by dsp16_resampling_compute(), dsp16_resampling_link(), and dsp16_vect_conv().

 void dsp16_vect_dotdiv ( dsp16_t * vect1, dsp16_t * vect2, dsp16_t * vect3, int size )

16-bit fixed point version of the vector dot division function.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the dot division. vect2 A pointer on the 16-bit real vector that will be divided with the other input vector (vect3). vect3 A pointer on the 16-bit real vector that will be divided with the other input vector (vect2). size The size of the input buffers.

References DSP16_QB, and n.

 void dsp16_vect_dotmul ( dsp16_t * vect1, dsp16_t * vect2, dsp16_t * vect3, int size )

16-bit fixed point version of the vector dot multiplication function.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the dot multiplication. vect2 A pointer on the 16-bit real vector that will be multiplied with the other input vector (vect3). vect3 A pointer on the 16-bit real vector that will be multiplied with the other input vector (vect2). size The size of the input buffers.

References DSP16_QB, and n.

Referenced by dsp_calculate_fft().

 void dsp16_vect_intdiv ( dsp16_t * vect1, dsp16_t * vect2, int size, int integer )

16-bit fixed point version of the vector division with an integer.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be divided with the integer. size The size of the buffers. integer The integer to be divided with the vector (vect2).

References DSP16_INTDIVISION, and n.

Referenced by int_division().

 void dsp16_vect_intmul ( dsp16_t * vect1, dsp16_t * vect2, int size, int integer )

16-bit fixed point version of the vector multiplication with an integer.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be multiplied with the integer. size The size of the buffers. integer The integer to be multiplied with the vector (vect2).

References DSP16_INTMULTIPLICATION, and n.

Referenced by int_multiplication().

 dsp16_t dsp16_vect_max ( dsp16_t * vect1, int size )

16-bit fixed point version of the vector maximum function.

Parameters
 vect1 A pointer on the 16-bit real vector that is used to find its maximum. size The size of the input buffer.
Returns
The maximum of the vector (vect1).

References DSP16_MAXIMUM, DSP16_QA, DSP16_QB, DSP_Q_MIN, max, and n.

Referenced by dsp_calculate_fft(), and main().

 dsp16_t dsp16_vect_min ( dsp16_t * vect1, int size )

16-bit fixed point version of the vector minimum function.

Parameters
 vect1 A pointer on the 16-bit real vector that is used to find its minimum. size The size of the input buffer.
Returns
The minimum of the vector (vect1).

References DSP16_MINIMUM, DSP16_QA, DSP16_QB, DSP_Q_MAX, min, and n.

 void dsp16_vect_neg ( dsp16_t * vect1, dsp16_t * vect2, int size )

16-bit fixed point version of the vector negate function.

Parameters
 vect1 A pointer on the 16-bit real vector that will receive the result. vect2 A pointer on the 16-bit real vector that will be negate. size The size of the input buffer.

References DSP16_NEGATE, and n.

 void dsp16_vect_pow ( dsp16_t * vect1, dsp16_t * vect2, int size, dsp16_t real )

16-bit fixed point version of the power function.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be raised to the power 'real'. size The size of the buffers. real The real number used to raised to the power 'vect2'.
Note
If the vector contains negative numbers, the result for these items will be DSP_Q_MIN.

References DSP16_POWER, and n.

 void dsp16_vect_realadd ( dsp16_t * vect1, dsp16_t * vect2, int size, dsp16_t real )

16-bit fixed point version of the vector addition with a real number.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be added with the real number. size The size of the buffers. real The real number to be added with the vector (vect2).

 void dsp16_vect_realdiv ( dsp16_t * vect1, dsp16_t * vect2, int size, dsp16_t real )

16-bit fixed point version of the vector division with a real number.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be divided with the real number. size The size of the buffers. real The real number to be divided with the vector (vect2).

References DSP16_QB, and n.

Referenced by dsp16_resampling_setup(), dsp_calculate_fft(), and usb_stream_process().

 void dsp16_vect_realmul ( dsp16_t * vect1, dsp16_t * vect2, int size, dsp16_t real )

16-bit fixed point version of the vector multiplication with a real number.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be multiplied with the real number. size The size of the buffers. real The real number to be multiplied with the vector (vect2).

References DSP16_QB, and n.

Referenced by dsp16_resampling_setup(), and generate_signal().

 void dsp16_vect_realsub ( dsp16_t * vect1, dsp16_t * vect2, int size, dsp16_t real )

16-bit fixed point version of the vector subtraction with a real number.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the operation. vect2 A pointer on the 16-bit real vector that will be subtracted with the real number. size The size of the buffers. real The real number to be subtracted with the vector (vect2).

References DSP16_REALSUBTRACTION, and n.

Referenced by real_subtraction().

 void dsp16_vect_sub ( dsp16_t * vect1, dsp16_t * vect2, dsp16_t * vect3, int size )

16-bit fixed point version of the vector subtraction function.

Parameters
 vect1 A pointer on the 16-bit real vector that will received the result of the subtraction. vect2 A pointer on the 16-bit real vector that will be subtracted with the other input vector (vect3). vect3 A pointer on the 16-bit real vector that will be subtracted with the other input vector (vect2). size The size of the input buffers.

References n.

 static void dsp16_vect_zeropad ( dsp16_t * vect1, int size, int num_zero )
inlinestatic

16-bit fixed point version of the zero padding function.

Parameters
 vect1 A pointer on the 16 bits real vector that has to be padded with zeros. size The size of this vector. num_zero The number of zeros to pad at the end of the vector.

Referenced by dsp16_gen_dirac(), dsp16_resampling_setup(), and dsp16_vect_conv().

 void dsp32_vect_add ( dsp32_t * vect1, dsp32_t * vect2, dsp32_t * vect3, int size )

32-bit fixed point version of the vector addition function.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the addition. vect2 A pointer on the 32-bit real vector that will be added with the other input vector (vect3). vect3 A pointer on the 32-bit real vector that will be added with the other input vector (vect2). size The size of the input buffers.

References n.

 void dsp32_vect_add_and_sat ( dsp32_t * vect1, dsp32_t * vect2, dsp32_t * vect3, int size )

32-bit fixed point version of the vector addition function.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the addition. vect2 A pointer on the 32-bit real vector that will be added with the other input vector (vect3). vect3 A pointer on the 32-bit real vector that will be added with the other input vector (vect2). size The size of the input buffers.

 void dsp32_vect_complex_abs ( dsp32_t * vect1, dsp32_complex_t * vect2, int size )

32-bit fixed point version of the complex vector absolute function.

Parameters
 vect1 A pointer on the 32-bit real vector that will receive the result. vect2 A pointer on the 32-bit complex vector that will be computed. size The size of the input buffer.

References DSP32_COMPLEX_ABS, dsp32_vect_complex_abs_kernel_x0(), and n.

Referenced by main().

 void dsp32_vect_complex_add ( dsp32_complex_t * vect1, dsp32_complex_t * vect2, dsp32_complex_t * vect3, int size )

32-bit fixed point version of the complex vector addition function.

Parameters
 vect1 A pointer on the 32-bit complex vector that will received the result of the addition. vect2 A pointer on the 32-bit complex vector that will be added with the other input vector (vect3). vect3 A pointer on the 32-bit complex vector that will be added with the other input vector (vect2). size The size of the input buffers.

 void dsp32_vect_complex_sub ( dsp32_complex_t * vect1, dsp32_complex_t * vect2, dsp32_complex_t * vect3, int size )

32-bit fixed point version of the complex vector subtraction function.

Parameters
 vect1 A pointer on the 32-bit complex vector that will received the result of the subtraction. vect2 A pointer on the 32-bit complex vector that will be subtracted with the other input vector (vect3). vect3 A pointer on the 32-bit complex vector that will be subtracted with the other input vector (vect2). size The size of the input buffers.

References DSP32_COMPLEXSUBITION, and n.

 void dsp32_vect_conv ( dsp32_t * vect1, dsp32_t * vect2, int vect2_size, dsp32_t * vect3, int vect3_size )

32-bit fixed point version of the Convolution.

Parameters
 vect1 A pointer on a 32-bits fixed-point vector corresponding to the output buffer. vect2 A pointer on a 32-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. vect2_size The length of the first input buffer (must be greater or equals to 8). vect3 A pointer on a 32-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. vect3_size The length of the second input buffer (must be greater or equals to 8)
Note
You need the "Partial Convolution" module
the "Copy" module

Referenced by convolution(), and main().

 void dsp32_vect_convpart ( dsp32_t * vect1, dsp32_t * vect2, int vect2_size, dsp32_t * vect3, int vect3_size )

32-bit fixed point version of the Partial Convolution.

Parameters
 vect1 A pointer on a 32-bits fixed-point vector corresponding to the output buffer. vect2 A pointer on a 32-bits fixed-point vector of vect2_size elements corresponding to the first input buffer. vect2_size The length of the first input buffer (must be greater or equals to 4). vect3 A pointer on a 32-bits fixed-point vector of vect3_size elements corresponding to the second input buffer. vect3_size The length of the second input buffer (must be greater or equals to 8)

References vect1, vect2, and vect3.

Referenced by dsp32_filt_fir(), dsp32_vect_conv(), and partial_convolution().

 static void dsp32_vect_copy ( dsp32_t * vect1, dsp32_t * vect2, int size )
inlinestatic

32-bit fixed point version of the copy function.

Parameters
 vect1 A pointer on the 32 bits real vector that will receive data. vect2 A pointer on the 32 bits real vector to be copied. size The size of those vectors.

Referenced by copy(), and dsp32_vect_conv().

 void dsp32_vect_dotdiv ( dsp32_t * vect1, dsp32_t * vect2, dsp32_t * vect3, int size )

32-bit fixed point version of the vector dot division function.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the dot division. vect2 A pointer on the 32-bit real vector that will be divided with the other input vector (vect3). vect3 A pointer on the 32-bit real vector that will be divided with the other input vector (vect2). size The size of the input buffers.

References DSP32_QB, and n.

Referenced by dot_division().

 void dsp32_vect_dotmul ( dsp32_t * vect1, dsp32_t * vect2, dsp32_t * vect3, int size )

32-bit fixed point version of the vector dot multiplication function.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the dot multiplication. vect2 A pointer on the 32-bit real vector that will be multiplied with the other input vector (vect3). vect3 A pointer on the 32-bit real vector that will be multiplied with the other input vector (vect2). size The size of the input buffers.

References DSP32_QB, and n.

Referenced by dot_multiplication().

 void dsp32_vect_intdiv ( dsp32_t * vect1, dsp32_t * vect2, int size, int integer )

32-bit fixed point version of the vector division with an integer.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be divided with the integer. size The size of the buffers. integer The integer to be divided with the vector (vect2).

References DSP32_INTDIVISION, and n.

 void dsp32_vect_intmul ( dsp32_t * vect1, dsp32_t * vect2, int size, int integer )

32-bit fixed point version of the vector multiplication with an integer.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be multiplied with the integer. size The size of the buffers. integer The integer to be multiplied with the vector (vect2).

References DSP32_INTMULTIPLICATION, and n.

 dsp32_t dsp32_vect_max ( dsp32_t * vect1, int size )

32-bit fixed point version of the vector maximum function.

Parameters
 vect1 A pointer on the 32-bit real vector that is used to find its maximum. size The size of the input buffer.
Returns
The maximum of the vector (vect1).

References DSP32_MAXIMUM, DSP32_QA, DSP32_QB, DSP_Q_MIN, max, and n.

Referenced by main(), and maximum().

 dsp32_t dsp32_vect_min ( dsp32_t * vect1, int size )

32-bit fixed point version of the vector minimum function.

Parameters
 vect1 A pointer on the 32-bit real vector that is used to find its minimum. size The size of the input buffer.
Returns
The minimum of the vector (vect1).

References DSP32_MINIMUM, DSP32_QA, DSP32_QB, DSP_Q_MAX, min, and n.

Referenced by minimum().

 void dsp32_vect_neg ( dsp32_t * vect1, dsp32_t * vect2, int size )

32-bit fixed point version of the vector negate function.

Parameters
 vect1 A pointer on the 32-bit real vector that will receive the result. vect2 A pointer on the 32-bit real vector that will be negate. size The size of the input buffer.

References DSP32_NEGATE, and n.

Referenced by negate().

 void dsp32_vect_pow ( dsp32_t * vect1, dsp32_t * vect2, int size, dsp32_t real )

32-bit fixed point version of the power function.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be raised to the power 'real'. size The size of the buffers. real The real number used to raised to the power 'vect2'.
Note
If the vector contains negative numbers, the result for these items will be DSP_Q_MIN.

References DSP32_POWER, and n.

Referenced by power().

 void dsp32_vect_realadd ( dsp32_t * vect1, dsp32_t * vect2, int size, dsp32_t real )

32-bit fixed point version of the vector addition with a real number.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be added with the real number. size The size of the buffers. real The real number to be added with the vector (vect2).

 void dsp32_vect_realdiv ( dsp32_t * vect1, dsp32_t * vect2, int size, dsp32_t real )

32-bit fixed point version of the vector division with a real number.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be divided with the real number. size The size of the buffers. real The real number to be divided with the vector (vect2).

References DSP32_QB, and n.

Referenced by real_division().

 void dsp32_vect_realmul ( dsp32_t * vect1, dsp32_t * vect2, int size, dsp32_t real )

32-bit fixed point version of the vector multiplication with a real number.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be multiplied with the real number. size The size of the buffers. real The real number to be multiplied with the vector (vect2).

References DSP32_QB, and n.

Referenced by real_multiplication().

 void dsp32_vect_realsub ( dsp32_t * vect1, dsp32_t * vect2, int size, dsp32_t real )

32-bit fixed point version of the vector subtraction with a real number.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the operation. vect2 A pointer on the 32-bit real vector that will be subtracted with the real number. size The size of the buffers. real The real number to be subtracted with the vector (vect2).

References DSP32_REALSUBTRACTION, and n.

 void dsp32_vect_sub ( dsp32_t * vect1, dsp32_t * vect2, dsp32_t * vect3, int size )

32-bit fixed point version of the vector subtraction function.

Parameters
 vect1 A pointer on the 32-bit real vector that will received the result of the subtraction. vect2 A pointer on the 32-bit real vector that will be subtracted with the other input vector (vect3). vect3 A pointer on the 32-bit real vector that will be subtracted with the other input vector (vect2). size The size of the input buffers.

References n.

Referenced by subtraction().

 static void dsp32_vect_zeropad ( dsp32_t * vect1, int size, int num_zero )
inlinestatic

32-bit fixed point version of the zero padding function.

Parameters
 vect1 A pointer on the 32 bits real vector that has to be padded with zeros. size The size of this vector. num_zero The number of zeros to pad at the end of the vector.

Referenced by dsp32_gen_dirac(), dsp32_vect_conv(), and zero_padding().