CPPStandaloneCodeObject class

(Shortest import: from brian2.devices.cpp_standalone import CPPStandaloneCodeObject)

class brian2.devices.cpp_standalone.codeobject.CPPStandaloneCodeObject(owner, code, variables, variable_indices, template_name, template_source, compiler_kwds, name='codeobject*')[source]

Bases: brian2.codegen.codeobject.CodeObject

C++ standalone code object

The code should be a MultiTemplate object with two macros defined, main (for the main loop code) and support_code for any support code (e.g. function definitions).

Methods

__call__(**kwds) Call self as a function.
run() Runs the code in the namespace.

Details

__call__(**kwds)[source]

Call self as a function.

run()[source]

Runs the code in the namespace.

Returns:

return_value : dict

A dictionary with the keys corresponding to the output_variables defined during the call of CodeGenerator.code_object.