IO Variants: 2
Variant: 1
frac32buffer.positive index in fraction of table size
frac32buffer table[a]
objref table
uint32_t asat = __USAT(inlet_a, 27);
int index = asat >> (27 - attr_table.LENGTHPOW);
int32_t y1 = attr_table.array[index] << attr_table.GAIN;
int32_t y2 = attr_table.array[(index + 1) & attr_table.LENGTHMASK]
<< attr_table.GAIN;
int frac = (asat - (index << (27 - attr_table.LENGTHPOW)))
<< (attr_table.LENGTHPOW + 3);
int32_t rr;
rr = ___SMMUL(y1, (1 << 30) - frac);
rr = ___SMMLA(y2, frac, rr);
outlet_o = rr << 2;
Variant: 2
frac32.positive index in fraction of table size
frac32 table[a]
objref table
uint32_t asat = __USAT(inlet_a, 27);
int index = asat >> (27 - attr_table.LENGTHPOW);
int32_t y1 = attr_table.array[index] << attr_table.GAIN;
int32_t y2 = attr_table.array[(index + 1) & attr_table.LENGTHMASK]
<< attr_table.GAIN;
int frac = (asat - (index << (27 - attr_table.LENGTHPOW)))
<< (attr_table.LENGTHPOW + 3);
int32_t rr;
rr = ___SMMUL(y1, (1 << 30) - frac);
rr = ___SMMLA(y2, frac, rr);
outlet_o = rr << 2;