.. currentmodule:: brian.experimental.codegen
.. _experimental-codegen:
Code generation
===============
Brian has support for automatic generation of C code, detailed in :ref:`compiled-code`.
We also have experimental support for C code generation
more widely, implementing the algorithms described
in `Goodman (2010) `__.
This support can be activated using the ``usecodegen*``, ``usenewpropagate``
and ``usecstdp`` global preferences
(see :ref:`preferences`).
Note that not all code will run without problems using code generation yet, but
in most cases it will and speed improvements can be very substantial, especially
for STDP.
References
----------
* `Goodman DFM (2010) `__.
Code Generation: A Strategy for Neural Network Simulators.
Neuroinformatics 8, no. 3 (9). doi:10.1007/s12021-010-9082-x.
[`pdf `__]