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

Remove 18 #395

Closed
wants to merge 4 commits into from
Closed
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: 2 additions & 7 deletions spinnman/processes/get_routes_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from functools import partial
from typing import List, Optional

from spinn_machine import MulticastRoutingEntry, Router
from spinn_machine import MulticastRoutingEntry
from spinnman.messages.scp.impl.read_memory import ReadMemory, Response
from spinnman.constants import UDP_MESSAGE_MAX_SIZE

Expand Down Expand Up @@ -64,13 +64,8 @@ def _add_routing_entry(
if self._app_id is not None and self._app_id != app_id:
return

# Convert bit-set into list of (set) IDs
processor_ids, link_ids = \
Router.convert_spinnaker_route_to_routing_ids(route)

self._entries[route_no + offset] = MulticastRoutingEntry(
key, mask, processor_ids=processor_ids, link_ids=link_ids,
defaultable=False)
key, mask, defaultable=False, spinnaker_route=route)

def __handle_response(self, offset: int, response: Response):
for route_no in range(_ENTRIES_PER_READ):
Expand Down
7 changes: 3 additions & 4 deletions spinnman/processes/load_fixed_route_routing_entry_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from spinn_machine import FixedRouteEntry, Router
from spinn_machine import FixedRouteEntry
from spinnman.messages.scp.impl import FixedRouteInit
from spinnman.processes import AbstractMultiConnectionProcess

Expand All @@ -36,7 +36,6 @@ def load_fixed_route(
:param int app_id: The ID of the application with which to associate
the routes. If not specified, defaults to 0.
"""
route_entry = Router.convert_routing_table_entry_to_spinnaker_route(
fixed_route)
with self._collect_responses():
self._send_request(FixedRouteInit(x, y, route_entry, app_id))
self._send_request(FixedRouteInit(
x, y, fixed_route.spinnaker_route, app_id))
6 changes: 1 addition & 5 deletions spinnman/processes/load_routes_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import struct
from typing import Collection

from spinn_machine import Router
from spinn_machine.multicast_routing_entry import MulticastRoutingEntry

from spinnman.exceptions import SpinnmanInvalidParameterException
Expand Down Expand Up @@ -62,12 +61,9 @@ def load_routes(
routing_data = bytearray(16 * (len(routes) + 1))
n_entries = 0
for route in routes:
route_entry = \
Router.convert_routing_table_entry_to_spinnaker_route(route)

_ROUTE_PATTERN.pack_into(
routing_data, n_entries * 16, n_entries,
route_entry, route.routing_entry_key, route.mask)
route.spinnaker_route, route.routing_entry_key, route.mask)
n_entries += 1

# Add an entry to mark the end
Expand Down
Loading