Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rev in syn #520

Merged
merged 2 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/genn/genn/code_generator/groupMerged.cc
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,6 @@ SynapseGroupMergedBase::SynapseGroupMergedBase(size_t index, const std::string &
addPSPointerField(precision, "inSyn", backend.getDeviceVarPrefix() + "inSyn");
}
}
// for all types of roles
if(getArchetype().isPresynapticOutputRequired()) {
addPreOutputPointerField(precision, "revInSyn", backend.getDeviceVarPrefix() + "revInSyn");
}

if(role == Role::PresynapticUpdate) {
if(getArchetype().isTrueSpikeRequired()) {
Expand All @@ -967,6 +963,11 @@ SynapseGroupMergedBase::SynapseGroupMergedBase(size_t index, const std::string &

// If this structure is used for updating rather than initializing
if(updateRole) {
// for all types of roles
if (getArchetype().isPresynapticOutputRequired()) {
addPreOutputPointerField(precision, "revInSyn", backend.getDeviceVarPrefix() + "revInSyn");
}

// If presynaptic population has delay buffers
if(getArchetype().getSrcNeuronGroup()->isDelayRequired()) {
addSrcPointerField("unsigned int", "srcSpkQuePtr", backend.getScalarAddressPrefix() + "spkQuePtr");
Expand Down
2 changes: 1 addition & 1 deletion src/genn/genn/synapseGroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ SynapseGroup::SynapseGroup(const std::string &name, SynapseMatrixType matrixType
m_PSVarLocation(psVarInitialisers.size(), defaultVarLocation), m_PSExtraGlobalParamLocation(ps->getExtraGlobalParams().size(), defaultExtraGlobalParamLocation),
m_SparseConnectivityInitialiser(connectivityInitialiser), m_ToeplitzConnectivityInitialiser(toeplitzInitialiser), m_SparseConnectivityLocation(defaultSparseConnectivityLocation),
m_ConnectivityExtraGlobalParamLocation(connectivityInitialiser.getSnippet()->getExtraGlobalParams().size(), defaultExtraGlobalParamLocation),
m_FusedPSVarSuffix(name), m_FusedWUPreVarSuffix(name), m_FusedWUPostVarSuffix(name), m_PSTargetVar("Isyn"), m_PreTargetVar("Isyn")
m_FusedPSVarSuffix(name), m_FusedWUPreVarSuffix(name), m_FusedWUPostVarSuffix(name), m_FusedPreOutputSuffix(name), m_PSTargetVar("Isyn"), m_PreTargetVar("Isyn")
{
// Validate names
Utils::validatePopName(name, "Synapse group");
Expand Down