Mlib_Add4; Available Versions; Declaration - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Add4

#include "mlib.h"
static
frac32_t
f32Add1, f32Add2, f32Result;
void main(void)
{
f32Add1 = FRAC32(-0.8);
f32Add2 = FRAC32(-0.5);
/* f32Result = sat(f32Add1 + f32Add2) */
f32Result = MLIB_AddSat_F32(f32Add1, f32Add2);
}
2.5 MLIB_Add4
The
MLIB_Add4
functions return the sum of four addends. The function does not
saturate the output. See the following equation:

2.5.1 Available versions

This function is available in the following versions:
• Fractional output - the output is the fractional portion of the result; the result is
within the range <-1 ; 1). The result may overflow.
The available versions of the
Function name
Add. 1
MLIB_Add4_F16
frac16_t
MLIB_Add4_F32
frac32_t

2.5.2 Declaration

The available
MLIB_Add4
28
/* f32Add1 = -0.8 */
/* f32Add2 = -0.5 */
Equation 5. Algorithm formula
MLIB_Add4
function are shown in the following table.
Table 2-5. Function versions
Input type
Add. 2
Add. 3
Add. 4
frac16_t
frac16_t
frac16_t
frac32_t
frac32_t
frac32_t
functions have the following declarations:
MLIB User's Guide, Rev. 2, 10/2015
Result
Description
type
frac16_t
Addition of four 16-bit fractional addends.
The output is within the range <-1 ; 1).
frac32_t
Addition of four 32-bit fractional addends.
The output is within the range <-1 ; 1).
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents