53 int64_t s = (int64_t) bitsk(x);
54 int64_t u = (int64_t) bitsulr(
decay);
56 return kbits((
int_k_t) ((s * u) >> 32));
66 uint64_t s = (uint64_t) bitsuk(x);
67 uint64_t u = (uint64_t) bitsulr(
decay);
69 return ukbits((
uint_uk_t) ((s * u) >> 32));
79 int64_t s = (int64_t) bitsk(x);
80 int64_t u = (int64_t) bitsulr(
decay);
82 return rbits((
int_r_t) ((s * u) >> 32));
92 uint64_t s = (uint64_t) bitsuk(x);
93 uint64_t u = (uint64_t) bitsulr(
decay);
95 return urbits((
uint_ur_t) ((s * u) >> 32));
99 uint64_t s = (uint64_t) bitsk(x);
100 uint64_t u = (uint64_t) bitsulr(
decay);
118#define decay(x, d) ({ \
119 __typeof__(x) tmp = (x); \
120 if (__builtin_types_compatible_p(__typeof__(x), s1615)) {\
121 tmp = decay_s1615(x, d); \
122 } else if (__builtin_types_compatible_p(__typeof__(x), u1616)) {\
123 tmp = decay_u1616(x, d); \
124 } else if (__builtin_types_compatible_p(__typeof__(x), s015)) {\
125 tmp = decay_s015(x, d); \
126 } else if (__builtin_types_compatible_p(__typeof__(x), u016)) {\
127 tmp = decay_u016(x, d); \
#define decay(x, d)
This is a type-generic decay "function".
static u1616 decay_u1616(u1616 x, decay_t decay)
this method takes a s1616 and decays it by a given amount (denoted by the decay) (to compensate for t...
static s1615 decay_s1615(s1615 x, decay_t decay)
this method takes a s1615 and decays it by a given amount (denoted by the decay) (to compensate for t...
static u016 decay_u016(u016 x, decay_t decay)
this method takes a s016 and decays it by a given amount (denoted by the decay) (to compensate for th...
static s015 decay_s015(s015 x, decay_t decay)
this method takes a s015 and decays it by a given amount (denoted by the decay) (to compensate for th...
maths-util.h - first created 7/10/2013 version 0.1
unsigned long fract UFRACT
Type used for "unsigned fractional" numbers.
Data type definitions for SpiNNaker Neuron-modelling.