-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Probes are partitioned to reduce the network traffic load on each core simulating a probe.
- Loading branch information
Showing
7 changed files
with
219 additions
and
151 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import numpy as np | ||
|
||
from nengo_spinnaker.builder.connection import ( | ||
EnsembleTransmissionParameters, PassthroughNodeTransmissionParameters) | ||
|
||
|
||
def slice_accepts_signal(in_slice, signal_params, transmission_params): | ||
"""Determine whether a signal should be accepted by the input slice of a | ||
vertex. | ||
""" | ||
if isinstance(transmission_params, EnsembleTransmissionParameters): | ||
# If the connection is from an ensemble only return true if the | ||
# decoders contain non-zero values in the input dimensions we care | ||
# about. | ||
return np.any(transmission_params.decoders[:, in_slice]) | ||
elif isinstance(transmission_params, | ||
PassthroughNodeTransmissionParameters): | ||
# If the connection is from a Node of some variety then only return | ||
# true if the transform contains non-zero values in the rows which | ||
# relate to the subspace we receive input in. | ||
return np.any(transmission_params.transform[in_slice]) | ||
|
||
# We don't know how to interpret the transmission parameters | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.