Source code for pacman.model.partitioner_interfaces.legacy_partitioner_api

# Copyright (c) 2019-2022 The University of Manchester
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <>.

from spinn_utilities.abstract_base import (
    AbstractBase, abstractmethod)

# Can't use this decorator: circular import problem
# @require_subclass(ApplicationVertex)
class LegacyPartitionerAPI(object, metaclass=AbstractBase):
    """ API used by the vertices which dont have their own splitters but use\
        what master did before the self partitioning stuff came to be.
    __slots__ = []

[docs] @abstractmethod def get_sdram_used_by_atoms(self, vertex_slice): """ Get the separate sdram requirements for a range of atoms. :param ~pacman.model.graphs.common.Slice vertex_slice: the low value of atoms to calculate resources from :rtype: ~pacman.model.resources.AbstractSDRAM """
[docs] @abstractmethod def create_machine_vertex( self, vertex_slice, sdram, label=None): """ Create a machine vertex from this application vertex. :param ~pacman.model.graphs.common.Slice vertex_slice: The slice of atoms that the machine vertex will cover. :param ~pacman.model.resourcesAbstractSDRAM sdram: The sdram used by the machine vertex. :param label: human readable label for the machine vertex :type label: str or None :return: The created machine vertex :rtype: ~pacman.model.graphs.machine.MachineVertex """
[docs] @staticmethod def abstract_methods(): """ Exposes the abstract methods and properties defined in this class. :rtype frozenset(str) """ return LegacyPartitionerAPI.__abstractmethods__