The assignment operations, such as +=, are the exception to the rule. The
logic of an assignment operation is defined by the type of a variable posi-
tioned on the left side of the expression.
Floating-point operations require an explicit cast of a fractional value to
the desired floating type.
Saturated Arithmetic
The
compiler supports saturated arithmetic for fractional data in
cc219x
the saturated arithmetic mode.
Whenever a calculation results in a bigger value than the
represents, the result is truncated (wrapped around). An overflow flag is
set to warn the program that the value has exceeded its limits. To prevent
the overflow and to get the result as the maximum representable value
when processing signal data, use saturated arithmetic. Saturated arithmetic
forces an overflowed value to become the maximum representable value.
The mode is set to be saturated or default with the
and
reset_saturate_mode()
corresponding variant effected in the saturated mode. For example,
,
add_sat
sub_sat
Preprocessor Generated Warnings
The preprocessor directive
warning and continue preprocessing. The text on the remainder of the line
that follows
#warning
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
functions. Each arithmetic operator has its
,
,
.
neg_sat
...
#warning
is used as the warning message.
set_saturate_mode()
causes the preprocessor to generate a
Compiler
data type
fract
1-93
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers