57 #ifndef __POLYNOMIAL_H__
58 #define __POLYNOMIAL_H__
79 #ifdef __ARM_FEATURE_DSP
80 register int r = *a++;
82 assert(!__reset_and_saturation_occurred());
84 r = __smlawb(r, x, *a++);
86 assert(!__saturation_occurred());
89 register int64_t t = *a++;
90 register int64_t dx = (int64_t) ((int16_t) (x & 0xFFFF));
93 t = (t * dx >> 16) + *a++;
95 return (
int) (t & 0xFFFFFFFF);
115 #ifdef __ARM_FEATURE_DSP
116 register int r = *a++;
118 assert(!__reset_and_saturation_occurred());
119 for ( ; n > 0; n--) {
120 r = __smlawt(r, x, *a++);
122 assert(!__saturation_occurred());
125 register int64_t t = *a++;
126 register int64_t dx = (int64_t) (x >> 16);
128 for ( ; n > 0; n--) {
129 t = (t * dx >> 16) + *a++;
131 return (
int) (t & 0xFFFFFFFF);
SpiNNaker debug header file.
#define assert(assertion)
This macro performs an assertion check on a condition and aborts if the condition is not met.
Definition: assert.h:145
static int __horner_int_b(int *a, int x, int n)
Horner evaluation of a polynomial of s1615 at a point given by the lower (signed) 16-bits of x.
Definition: polynomial.h:74
static int __horner_int_t(int *a, int x, int n)
Horner evaluation of a polynomial of s1615 at a point given by the upper (signed) 16-bits of x.
Definition: polynomial.h:110