C/C++ Compiler Language Extensions
This function rounds the lower 16-bits of the 32-bit input parameter into
the most significant 16 bits with saturation. The resulting bits are shifted
right by 16.
Saturate
fract16 saturate (fract32)
This function returns the 16 most significant bits of the input parameter.
If the input parameter is greater than
input parameter is less than
Short shift left
fract16 shl (fract16, fract16)
This function arithmetically shifts the first parameter left by second
parameter bits. The empty bits are zero filled. If second parameter is nega-
tive the operation shifts right.
Short shift right
fract16 shr (fract16, fract16)
This function arithmetically shifts the first parameter right by second
parameter bits with sign extension. If second parameter is negative the
operation shifts left.
Shift right with rounding
fract16 shr_r (fract16, fract16)
This function performs a shift to the right as per the
additional rounding and saturation of the result.
Short subtract
fract16 sub (fract16, fract16)
1-114
,
0x8000
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
,
is returned. If the
0x7fff
0x7fff
is returned.
0x8000
shr()
for ADSP-219x DSPs
operation with
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?