Go to the documentation of this file.
25 #define CONFIG_HARDCODED_TABLES 0
29 #define TYPE_NAME "int32_t"
31 #define ARRAY_RENAME(x) write_int32_t_ ## x
32 #define ARRAY_URENAME(x) write_uint32_t_ ## x
35 #define TYPE_NAME "float"
37 #define ARRAY_RENAME(x) write_float_ ## x
38 #define ARRAY_URENAME(x) write_float_ ## x
47 for (
i = 0;
i <
b;
i++) {
59 for (
i = 0;
i <
a;
i++) {
87 printf(
"static const DECLARE_ALIGNED(16, %s, f20_0_8)[8][8][2] = {\n",
TYPE_NAME);
90 printf(
"static const DECLARE_ALIGNED(16, %s, f34_0_12)[12][8][2] = {\n",
TYPE_NAME);
93 printf(
"static const DECLARE_ALIGNED(16, %s, f34_1_8)[8][8][2] = {\n",
TYPE_NAME);
96 printf(
"static const DECLARE_ALIGNED(16, %s, f34_2_4)[4][8][2] = {\n",
TYPE_NAME);
100 printf(
"static const DECLARE_ALIGNED(16, %s, Q_fract_allpass)[2][50][3][2] = {\n",
TYPE_NAME);
103 printf(
"static const DECLARE_ALIGNED(16, %s, phi_fract)[2][50][2] = {\n",
TYPE_NAME);
static int f34_2_4[4][8][2]
static int pd_im_smooth[8 *8 *8]
static TABLE_CONST int Q_fract_allpass[2][50][3][2]
static int f20_0_8[8][8][2]
static int f34_0_12[12][8][2]
static int pd_re_smooth[8 *8 *8]
write_fileheader() adds some minor things like a "this is a generated file" comment and some standard includes. tablegen.h defines some write functions for one- and two-dimensional arrays for standard types - they print only the "core" parts so they are easier to reuse for multi-dimensional arrays so the outermost
static int f34_1_8[8][8][2]
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
printf("static const uint8_t my_array[100] = {\n")
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
#define i(width, name, range_min, range_max)
static int array[MAX_W *MAX_W]
static int phi_fract[2][50][2]
static void ps_tableinit(void)