sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
decay.h File Reference

utility method for decaying a value by a given amount More...

#include <common/maths-util.h>
#include <common/neuron-typedefs.h>

Go to the source code of this file.

Macros

#define decay(x, d)
 This is a type-generic decay "function".
 

Typedefs

typedef UFRACT decay_t
 

Functions

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 the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).
 
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 the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).
 
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 the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).
 
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 the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).
 
static u032 decay_s1615_to_u032 (s1615 x, decay_t decay)
 

Detailed Description

utility method for decaying a value by a given amount

The API includes:

Definition in file decay.h.

Macro Definition Documentation

◆ decay

#define decay (   x,
 
)
Value:
({ \
__typeof__(x) tmp = (x); \
if (__builtin_types_compatible_p(__typeof__(x), s1615)) {\
tmp = decay_s1615(x, d); \
} else if (__builtin_types_compatible_p(__typeof__(x), u1616)) {\
tmp = decay_u1616(x, d); \
} else if (__builtin_types_compatible_p(__typeof__(x), s015)) {\
tmp = decay_s015(x, d); \
} else if (__builtin_types_compatible_p(__typeof__(x), u016)) {\
tmp = decay_u016(x, d); \
} else {\
abort(1); \
}\
tmp; \
})
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...
Definition decay.h:65
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...
Definition decay.h:52
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...
Definition decay.h:91
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...
Definition decay.h:78
unsigned fract u016
unsigned accum u1616
fract s015
accum s1615

This is a type-generic decay "function".

Parameters
[in]xthe value to decayed
[in]dthe amount to decay the value by
Returns
the new decayed value

Definition at line 118 of file decay.h.

Typedef Documentation

◆ decay_t

typedef UFRACT decay_t

this is a redefine of the ufract into a decay for easier conversions in the future if the type is redefined

Definition at line 44 of file decay.h.

Function Documentation

◆ decay_s1615()

static s1615 decay_s1615 ( s1615  x,
decay_t  decay 
)
inlinestatic

this method takes a s1615 and decays it by a given amount (denoted by the decay) (to compensate for the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).

Parameters
[in]xthe s1615 value to decayed
[in]decaythe amount to decay the value by
Returns
the new decayed s1615 value

Definition at line 52 of file decay.h.

◆ decay_u1616()

static u1616 decay_u1616 ( u1616  x,
decay_t  decay 
)
inlinestatic

this method takes a s1616 and decays it by a given amount (denoted by the decay) (to compensate for the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).

Parameters
[in]xthe s1616 value to decayed
[in]decaythe amount to decay the value by
Returns
the new decayed s1616 value

Definition at line 65 of file decay.h.

◆ decay_s015()

static s015 decay_s015 ( s015  x,
decay_t  decay 
)
inlinestatic

this method takes a s015 and decays it by a given amount (denoted by the decay) (to compensate for the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).

Parameters
[in]xthe s015 value to decayed
[in]decaythe amount to decay the value by
Returns
the new decayed s015 value

Definition at line 78 of file decay.h.

◆ decay_u016()

static u016 decay_u016 ( u016  x,
decay_t  decay 
)
inlinestatic

this method takes a s016 and decays it by a given amount (denoted by the decay) (to compensate for the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly)).

Parameters
[in]xthe s016 value to decayed
[in]decaythe amount to decay the value by
Returns
the new decayed s016 value

Definition at line 91 of file decay.h.

◆ decay_s1615_to_u032()

static u032 decay_s1615_to_u032 ( s1615  x,
decay_t  decay 
)
inlinestatic

Definition at line 98 of file decay.h.