vect_dsp16_add_and_saturate.c File Reference


Detailed Description

generic 16-bit addition function

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file vect_dsp16_add_and_saturate.c.

#include "dsp.h"
#include "preprocessor.h"

Go to the source code of this file.

Defines

#define DSP16_ADD_KERNEL_X_FCT(x_num, data)
#define DSP16_ADDITION(x_num, data)

Functions

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 additon function.


Define Documentation

#define DSP16_ADD_KERNEL_X_FCT ( x_num,
data   ) 

Value:

static void TPASTE2(dsp16_vect_add_kernel_x, x_num)(dsp16_t *vect1, dsp16_t *vect2, dsp16_t *vect3) \
{ \
  MREPEAT(x_num, DSP16_ADDITION, ""); \
}

Definition at line 66 of file vect_dsp16_add_and_saturate.c.

#define DSP16_ADDITION ( x_num,
data   ) 

Value:

{ \
  S32 temp = vect2[x_num] + vect3[x_num]; \
  if (temp > DSP_Q_MAX(DSP16_QA, DSP16_QB)) \
    vect1[x_num] = DSP_Q_MAX(DSP16_QA, DSP16_QB); \
  else if (temp < DSP_Q_MIN(DSP16_QA, DSP16_QB)) \
    vect1[x_num] = DSP_Q_MIN(DSP16_QA, DSP16_QB); \
  else \
    vect1[x_num] = (dsp16_t) temp; \
}

Definition at line 52 of file vect_dsp16_add_and_saturate.c.


Generated on Fri Feb 19 02:23:20 2010 for AVR32 UC3 - EVK1104 DSPLib Demo Documentation by  doxygen 1.5.5