DSP_recip16
[Math]

Collaboration diagram for DSP_recip16:


Detailed Description

void DSP_recip16 (const short *restrict x, short *restrict rfrac, short *restrict rexp, short nx)


Function Documentation

void DSP_recip16 ( const short *restrict  x,
short *restrict  rfrac,
short *restrict  rexp,
short  nx 
)

This program performs a reciprocal on a vector of Q15 numbers. The result is stored in two parts: a Q15 part and an exponent (power of two) of the fraction. First, the input is loaded, then its absolute value is taken, then it is normalized, then divided using a loop of conditional subtracts, and finally it is negated if the original input was negative.

Parameters:
x = Input data array of shorts
rfrac = Output data array containing fractions
rexp = Output data array containing exponents
nx = Number of elements in the arrays
Algorithm:
DSP_recip16_cn.c is the natural C equivalent of the optimized intrinsic C code without restrictions note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
Arrays x, rfrac, and rexp do not overlap.
nx must be a multiple of 4 and greater than or equal to 4.
x must be double-word aligned.
Implementation notes:
Endian Support: The code supports both big and little endian modes.
Interruptibility: The code is interruptible.


Copyright 2014, Texas Instruments Incorporated