GSLContainer class
(Shortest import: from brian2.stateupdaters.GSL import GSLContainer)
- class brian2.stateupdaters.GSL.GSLContainer(method_options, integrator, abstract_code=None, needed_variables=None, variable_flags=None)[source]
Bases:
object
Class that contains information (equation- or integrator-related) required for later code generation
Methods
__call__
(obj)Transfer the code object class saved in self to the object sent as an argument.
Return codeobject class based on target language and device.
Details
- __call__(obj)[source]
Transfer the code object class saved in self to the object sent as an argument.
This method is returned when calling
GSLStateUpdater
. This class inherits fromStateUpdateMethod
which orignally only returns abstract code. However, with GSL this returns a method because more is needed than just the abstract code: the state updater requires its own CodeObject that is different from the otherNeuronGroup
objects. This method adds thisCodeObject
to theStateUpdater
object (and also adds the variables ‘t’, ‘dt’, and other variables that are needed in theGSLCodeGenerator
.