PyTimeloop
|
Base class for all processors, which are used to modify the specification before it is passed to Accelergy/Timeloop. More...
Public Member Functions | |
__init__ (self, Optional["Specification"] spec=None) | |
pre_parse_process (self, "Specification" spec) | |
Process the specification before parsing. | |
process (self, "Specification" spec) | |
Process the specification. | |
declare_attrs (self) | |
Initialize the attributes that the processor is responsible for. | |
get_index (self, type processor_type, "Specification" spec) | |
Get the index of the processor in the list of processors. | |
must_run_after (self, type other, "Specification" spec, bool ok_if_not_found=False) | |
Ensure that this processor runs after another processor. | |
add_attr (self, Node target, *args, **kwargs) | |
Public Attributes | |
logger = logging.getLogger(self.__class__.__name__) | |
spec = spec | |
Protected Attributes | |
bool | _initialized = True |
Base class for all processors, which are used to modify the specification before it is passed to Accelergy/Timeloop.
Attributes: spec: The specification to process. logger: The logger for this processor.
pytimeloop.timeloopfe.common.processor.Processor.__init__ | ( | self, | |
Optional["Specification"] | spec = None ) |
Reimplemented in pytimeloop.timeloopfe.common.processor.References2CopiesProcessor, pytimeloop.timeloopfe.common.processor.SimpleProcessor, pytimeloop.timeloopfe.v4.processors.constraint_attacher.ConstraintAttacherProcessor, pytimeloop.timeloopfe.v4.processors.constraint_macro.ConstraintMacroProcessor, pytimeloop.timeloopfe.v4.processors.enable_dummy_table.EnableDummyTableProcessor, pytimeloop.timeloopfe.v4.processors.permutation_optimizer.PermutationOptimizerProcessor, pytimeloop.timeloopfe.v4.processors.required_actions.RequiredActionsProcessor, pytimeloop.timeloopfe.v4.processors.sparse_opt_attacher.SparseOptAttacherProcessor, and pytimeloop.timeloopfe.v4.processors.to_diagram_processor.ToDiagramProcessor.
pytimeloop.timeloopfe.common.processor.Processor.add_attr | ( | self, | |
Node | target, | ||
* | args, | ||
** | kwargs ) |
pytimeloop.timeloopfe.common.processor.Processor.declare_attrs | ( | self | ) |
Initialize the attributes that the processor is responsible for.
!
Reimplemented in pytimeloop.timeloopfe.common.processor.SimpleProcessor, pytimeloop.timeloopfe.v4.processors.constraint_attacher.ConstraintAttacherProcessor, and pytimeloop.timeloopfe.v4.processors.constraint_macro.ConstraintMacroProcessor.
pytimeloop.timeloopfe.common.processor.Processor.get_index | ( | self, | |
type | processor_type, | ||
"Specification" | spec ) |
Get the index of the processor in the list of processors.
pytimeloop.timeloopfe.common.processor.Processor.must_run_after | ( | self, | |
type | other, | ||
"Specification" | spec, | ||
bool | ok_if_not_found = False ) |
Ensure that this processor runs after another processor.
!
other | The processor that this processor must run after. |
!
ok_if_not_found | If False, OK if the other processor is not found. If True, raise an exception if the other processor is not found. |
pytimeloop.timeloopfe.common.processor.Processor.pre_parse_process | ( | self, | |
"Specification" | spec ) |
Process the specification before parsing.
pytimeloop.timeloopfe.common.processor.Processor.process | ( | self, | |
"Specification" | spec ) |
Process the specification.
Reimplemented in pytimeloop.timeloopfe.common.processor.References2CopiesProcessor, pytimeloop.timeloopfe.common.processor.SimpleProcessor, pytimeloop.timeloopfe.v4.processors.constraint_attacher.ConstraintAttacherProcessor, pytimeloop.timeloopfe.v4.processors.constraint_macro.ConstraintMacroProcessor, pytimeloop.timeloopfe.v4.processors.dataspace2branch.Dataspace2BranchProcessor, pytimeloop.timeloopfe.v4.processors.enable_dummy_table.EnableDummyTableProcessor, pytimeloop.timeloopfe.v4.processors.permutation_optimizer.PermutationOptimizerProcessor, pytimeloop.timeloopfe.v4.processors.required_actions.RequiredActionsProcessor, pytimeloop.timeloopfe.v4.processors.sparse_opt_attacher.SparseOptAttacherProcessor, and pytimeloop.timeloopfe.v4.processors.to_diagram_processor.ToDiagramProcessor.
|
protected |
pytimeloop.timeloopfe.common.processor.Processor.logger = logging.getLogger(self.__class__.__name__) |
pytimeloop.timeloopfe.common.processor.Processor.spec = spec |