C/C++ Compiler Language Extensions
/* Standard struct & cc219x C/C++ Constructor struct */
/* Standard struct */
struct foo {int a; char b[2];};
struct foo make_foo(int x, char *s)
{
struct foo temp;
temp.a = x;
temp.b[0] = s[0];
if (s[0] !=
temp.b[1] = s[1];
else
temp.b[1] = '\0';
return temp;
}
/* Equivalent cc219x C/C++ constructor struct */
struct foo make_foo(int x, char *s)
{
return((struct foo) {x, {s[0], s[0] ? s[1] : '\0'}});
}
Fractional Type Support
While in C++ mode, the
arithmetic that provides a way of computing with non-integral values
within the confines of the fixed-point representation. The representation
on which the fractional support is based is that of a 16-bit integral type. In
this release of the compiler, there is no underlying C++ support for 32-bit
fractional arithmetic. The ADSP-219x processors provide hardware sup-
port for the 16-bit fractional arithmetic.
Fractional values are declared with the
program includes the
a set of standard arithmetic operators used in arithmetic expressions. Frac-
tional values are represented as signed values in a range of [
1-90
'\0')
compiler supports fractional (fixed-point)
cc219x
header file.
fract
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
data type. Ensure that your
fract
is a C++ class that supports
fract
for ADSP-219x DSPs
] with a
-1 ... 1
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?