> --
> You received this message because you are subscribed to the Google
> Groups "ahh-discuss" group.
> To post to this group, send email to ahh-d...@googlegroups.com.
> To unsubscribe from this group, send email to ahh-discuss...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/ahh-discuss?hl=en
> .
Hooks are just places you can put code in the automatically generated
GPU kernel. So, "code that goes in the if(spike) block after spikes
have been sent" is a hook, "code that happens before the model
variables are loaded from memory" is a hook. For the most part, this
code needs to be given as a string of valid CUDA/OpenCL C, with proper
semicolon termination of statements. Some API specific macros exist,
at least in SpikeSteream, eg "RAND" to get ( weak ) random floats.
The important hooks are the ones used for defining models and synapse behavior :
- InputSource(Unit)
- - self.code : a C statement as a string that modified implicite
local variable input_current
- - can be added to neurons, where it contributed to the driving
currents of the neuron
- Synapse(InputSource)
- - synapse.name : name unique within model
- - self.conductance : name of a state variable, in units of uS (micro-siemens)
- - self.delta_g : the amount that self.conductance state variable
should be incremented, per incoming spike
- - self.current : similar to InputSource.code ?
- neuron dynamics
- - Model(Unit)
- - - self.target_function : C function goes from model_cell_id to a
target synapse type
- - - self.reset : C code if spike
- - - self.dont_reset : C code if no spike
- - - self.spike_condition : C code (spike)? [ one expression ]
Basic probes to pull out spikes, state variables, mean state
variables, have been defined. If you are writing your own Probe, you
can provide custom C code to be inserted in the generated kernel. This
code can be inserted in the various hooks defined for Probes. For the
most part, this code will consist of copying some information from the
simulation into a buffer on the GPU where you can then copy it back to
host in the CPU portions of the Probe. Some probes don't need to
generate code : if you are pulling out state variables or spikes, its
possible to figure out where to copy by looking at information stored
in the Simulation instance.