From d7cdb8b816b714cd5340a2deb2d28d87b1d2790a Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Tue, 5 Nov 2024 12:28:06 +0000 Subject: [PATCH 1/3] increment version --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 0062ac9718..831446cbd2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -5.0.0 +5.1.0 From 693ea64060457f67a85822abf44c638aa8dc39c1 Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Tue, 5 Nov 2024 13:11:44 +0000 Subject: [PATCH 2/3] updated docstrings for C++ code --- pygenn/src/docStrings.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pygenn/src/docStrings.h b/pygenn/src/docStrings.h index af1bffa131..0836e35fa1 100644 --- a/pygenn/src/docStrings.h +++ b/pygenn/src/docStrings.h @@ -25,6 +25,12 @@ static const char *__doc_CodeGenerator_BackendBase = R"doc()doc"; +static const char *__doc_CodeGenerator_BackendBase_AtomicOperation = R"doc(What atomic operation is required)doc"; + +static const char *__doc_CodeGenerator_BackendBase_AtomicOperation_ADD = R"doc()doc"; + +static const char *__doc_CodeGenerator_BackendBase_AtomicOperation_OR = R"doc()doc"; + static const char *__doc_CodeGenerator_BackendBase_BackendBase = R"doc()doc"; static const char *__doc_CodeGenerator_BackendBase_ReductionTarget = R"doc(Simple struct to hold reduction targets)doc"; @@ -279,6 +285,8 @@ static const char *__doc_CodeGenerator_BackendBase_genTimer = R"doc()doc"; static const char *__doc_CodeGenerator_BackendBase_genVariableInit = R"doc()doc"; +static const char *__doc_CodeGenerator_BackendBase_getAtomicOperation = R"doc(Get suitable atomic *lhsPointer += rhsValue or *lhsPointer |= rhsValue style operation)doc"; + static const char *__doc_CodeGenerator_BackendBase_getDeviceMemoryBytes = R"doc(How many bytes of memory does 'device' have)doc"; static const char *__doc_CodeGenerator_BackendBase_getFilesToCopy = From 817c66423a860eeb42c4b811acefcf4df889d811 Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Tue, 5 Nov 2024 13:27:28 +0000 Subject: [PATCH 3/3] small bit of documentation about accessing postsynaptic variables with delay --- pygenn/genn_model.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pygenn/genn_model.py b/pygenn/genn_model.py index d6229ac9a8..f5009a4b9f 100644 --- a/pygenn/genn_model.py +++ b/pygenn/genn_model.py @@ -1290,11 +1290,18 @@ def create_weight_update_model( where, once again, ``inc`` is the amount to add to the postsynaptic neuron's ``inSyn`` variable and ``delay`` is the length of the dendritic delay in timesteps. By implementing ``delay`` as a weight update model variable, heterogeneous synaptic delays can be implemented. - For an example, see WeightUpdateModels::StaticPulseDendriticDelay for a simple synapse update model with heterogeneous dendritic delays. + For an example, see :func:`.weight_update_models.StaticPulseDendriticDelay` for a simple synapse update model with heterogeneous dendritic delays. + These delays can also be used to provide delayed access to ``post_vars`` and ``post_neuron_var_refs`` using ``[]`` syntax. For example, - When using dendritic delays, the *maximum* dendritic delay for a synapse populations must be specified via the - :attr:`SynapseGroup.max_dendritic_delay_timesteps` property. One can also define synaptic effects that occur in the reverse direction, - i.e. terms that are added to a target variable in the _presynaptic_ neuron using the ``addToPre(inc)`` function. For example, + .. code-block:: python + + pre_spike_syn_code="variable -= postVar[delay];" + + where, ``variable`` is a per-synapse variable; ``postVar`` is either a postsynaptic variable or postsynaptic variable reference; + and ``delay`` is some sort of integer expression. When using dendritic delays, the *maximum* dendritic delay for a synapse populations + must be specified via the :attr:`SynapseGroup.max_dendritic_delay_timesteps` property. One can also define synaptic effects that + occur in the reverse direction, i.e. terms that are added to a target variable in the _presynaptic_ neuron using the ``addToPre(inc)`` function. + For example, .. code-block:: python