PyTimeloop
|
Base class for all nodes in the hierarchy. More...
Public Member Functions | |
__init__ (self, *args, **kwargs) | |
get_specifiers_from_processors (cls, "BaseSpecification" spec) | |
Get the specifiers that have been set from processors. | |
reset_specifiers_from_processors (cls, Optional[Type] processor=None) | |
Reset the specifiers that have been set from processors. | |
declare_attrs (cls, *args, **kwargs) | |
Initialize the attributes of this node. | |
reset_processor_elems (cls, Optional[Type] processor=None) | |
recognize_all (cls, bool recognize_all=True) | |
Set whether all attributes under this node should be recognized. | |
str | get_tag (self) |
Get the tag of this node. | |
Iterable[Tuple[Union[str, int], Any]] | items (self) |
Get iterable of (key, value) or (index, value) pairs. | |
T | combine_index (self, Union[str, int] key, T value) |
Combine the value at the given key with the given value. | |
str | get_name (self, Union[Set, None] seen=None) |
Get the name of this node. | |
check_unrecognized (self, bool ignore_empty=False, ignore_should_have_been_removed_by=False) | |
Check for unrecognized keys in this node and all subnodes. | |
Any | recursive_apply (self, callable func, bool self_first=False, set applied_to=None) |
Apply a function to this node and all subnodes. | |
clean_empties (self) | |
Remove empty nodes from this node and all subnodes. | |
bool | isempty (self) |
Return True if this node is empty. | |
bool | isempty_recursive (self) |
Return True if this node or all subnodes are empty. | |
add_attr (cls, str key_or_tag, Optional[Union[type, Tuple[type,...], Tuple[None,...], Tuple[str,...], None]] required_type=None, Any default=default_unspecified_, Optional[Callable] callfunc=None, Optional[bool] part_name_match=None, Optional[bool] no_change_key=None, Any _processor_responsible_for_removing=None, Optional[Dict[str, TypeSpecifier]] _add_checker_to=None) | |
Initialize a type specifier for this class. | |
List[T] | get_nodes_of_type (self, Type[T] node_type) |
Return a list of all subnodes of a given type. | |
Callable | get_setter_lambda (self, Union[str, int] keytag) |
Get a function that can be used to set a value in this node. | |
Callable | get_combiner_lambda (self, Union[str, int] keytag) |
Get a function that can be used to combine a value to this node. | |
List[Tuple[Any, Callable]] | get_setters_for_keytag (self, str keytag, bool recursive=True) |
Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given key/tag. | |
List[Tuple[Any, Callable]] | get_combiners_for_keytag (self, str keytag, bool recursive=True) |
Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given key/tag. | |
List[Tuple[Any, Callable]] | get_setters_for_type (self, Type t, bool recursive=True) |
Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given type. | |
List[Tuple[Any, Callable]] | get_combiners_for_type (self, Type t, bool recursive=True) |
Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given type. | |
__str__ (self) | |
Return the name of this node. | |
__format__ (self, format_spec) | |
Formats the name of this node. | |
bool | is_defined_non_default_non_empty (self, str key) |
Returns True if the given key is defined in this node and is not the default value and is not empty. | |
Any | __getitem__ (self, Union[str, int] key) |
Get the value at the given key or index. | |
__setitem__ (self, Union[str, int] key, Any value) | |
Set the value at the given key or index. | |
parse_expressions (self, Optional[Dict[str, Any]] symbol_table=None, Optional[set] parsed_ids=None, Optional[Callable] callfunc=None) | |
Parse expressions in this node and all subnodes. | |
unique_class_name (cls) | |
Return a unique name for this class. | |
Static Public Member Functions | |
"BaseSpecification" | get_global_spec () |
Get the global specification object. | |
set_global_spec ("BaseSpecification" spec) | |
Set the global specification object. | |
Any | try_combine (Any a, Any b, Union["Node", None] innonde=None, Union[int, str, None] index=None) |
Try to combine two values. | |
Public Attributes | |
Node | parent_node = None |
"BaseSpecification" | spec = Node.get_global_spec() |
logger = logging.getLogger(self.__class__.__name__) | |
from_data = None | |
Protected Member Functions | |
Dict[str, TypeSpecifier] | _get_type_specifiers (cls, "BaseSpecification" spec) |
Get the type specifiers for this node. | |
_get_all_recognized (self) | |
Dict[Union[str, int], TypeSpecifier] | _get_index2checker (self, Optional[List[Tuple[str, Any]]] key2elem=None) |
_parse_elem (self, Union[str, int] key, TypeSpecifier check, Any value_override=None) | |
_parse_elems (self) | |
_parse_extra_elems (self, List[Tuple[str, Any]] key2elem) | |
_check_unrecognized (self, ignore_empty=False, ignore_should_have_been_removed_by=False) | |
_parse_expression (self, Union[str, int] index, Dict[str, Any] symbol_table, Optional[TypeSpecifier] checker=None) | |
Static Protected Member Functions | |
str | _get_tag (x) |
Protected Attributes | |
tuple | _init_args = (args, kwargs) |
bool | _default_parse = False |
Private Attributes | |
Union[int, str] | __currently_parsing_index = None |
Base class for all nodes in the hierarchy.
Attributes: parent_node (Node): The parent node of the current node. spec (Specification): The global specification object. _init_args (Tuple): The arguments and keyword arguments used to initialize the node. __currently_parsing_index (Union[int, str]): The index or key currently being parsed. logger (Logger): The logger object for the node's class. _default_parse (bool): Flag indicating whether the node should be parsed using default rules.
Methods: get_specifiers_from_processors(cls, spec): Get the specifiers from processors. reset_specifiers_from_processors(cls, processor): Reset the specifiers from processors. declare_attrs(cls, *args, **kwargs): Initialize the attributes of this node. reset_processor_elems(cls, processor): Reset the processor elements. recognize_all(cls, recognize_all): Set whether all attributes under this node should be recognized. _get_type_specifiers(cls, spec): Get the type specifiers for this node. _get_all_recognized(self): Check if all attributes under this node are recognized. _get_tag(x): Get the tag of a node. get_global_spec(): Get the global specification object. set_global_spec(spec): Set the global specification object. get_tag(self): Get the tag of this node. _get_index2checker(self, key2elem): Get the index-to-checker mapping. items(self): Get an iterable of (key, value) or (index, value) pairs. combine_index(self, key, value): Combine the value at the given key with the given value. _parse_elem(self, key, check, value_override): Parse an element of the node.
pytimeloop.timeloopfe.common.nodes.Node.__init__ | ( | self, | |
* | args, | ||
** | kwargs ) |
Reimplemented in pytimeloop.timeloopfe.common.base_specification.BaseSpecification, pytimeloop.timeloopfe.common.nodes.DictNode, pytimeloop.timeloopfe.common.nodes.FlatteningListNode, pytimeloop.timeloopfe.common.nodes.ListNode, pytimeloop.timeloopfe.v4.arch.Architecture, pytimeloop.timeloopfe.v4.arch.ArchNode, pytimeloop.timeloopfe.v4.arch.ArchNodes, pytimeloop.timeloopfe.v4.arch.Attributes, pytimeloop.timeloopfe.v4.arch.Branch, pytimeloop.timeloopfe.v4.arch.Component, pytimeloop.timeloopfe.v4.arch.Compute, pytimeloop.timeloopfe.v4.arch.Container, pytimeloop.timeloopfe.v4.arch.Leaf, pytimeloop.timeloopfe.v4.arch.Network, pytimeloop.timeloopfe.v4.arch.Nothing, pytimeloop.timeloopfe.v4.arch.Spatial, pytimeloop.timeloopfe.v4.arch.Storage, pytimeloop.timeloopfe.v4.arch.StorageAttributes, pytimeloop.timeloopfe.v4.arch.StorageAttributes, pytimeloop.timeloopfe.v4.components.Action, pytimeloop.timeloopfe.v4.components.Components, pytimeloop.timeloopfe.v4.components.CompoundComponent, pytimeloop.timeloopfe.v4.components.Subcomponent, pytimeloop.timeloopfe.v4.components.SubcomponentAction, pytimeloop.timeloopfe.v4.components.SubcomponentActionGroup, pytimeloop.timeloopfe.v4.constraints.Constraint, pytimeloop.timeloopfe.v4.constraints.ConstraintGroup, pytimeloop.timeloopfe.v4.constraints.Constraints, pytimeloop.timeloopfe.v4.constraints.Dataspace, pytimeloop.timeloopfe.v4.constraints.Factors, pytimeloop.timeloopfe.v4.constraints.Iteration, pytimeloop.timeloopfe.v4.constraints.MaxOverbookedProportion, pytimeloop.timeloopfe.v4.constraints.ProblemDataspaceList, pytimeloop.timeloopfe.v4.constraints.Spatial, pytimeloop.timeloopfe.v4.constraints.Temporal, pytimeloop.timeloopfe.v4.constraints.Utilization, pytimeloop.timeloopfe.v4.globals.AccelergyPlugIns, pytimeloop.timeloopfe.v4.globals.EnvironmentVariables, pytimeloop.timeloopfe.v4.globals.ExpressionCustomFunctions, pytimeloop.timeloopfe.v4.globals.Globals, pytimeloop.timeloopfe.v4.mapper.Mapper, pytimeloop.timeloopfe.v4.mapper.OptimizationMetrics, pytimeloop.timeloopfe.v4.mapspace.Mapspace, pytimeloop.timeloopfe.v4.problem.DataSpace, pytimeloop.timeloopfe.v4.problem.Density, pytimeloop.timeloopfe.v4.problem.DensityList, pytimeloop.timeloopfe.v4.problem.Instance, pytimeloop.timeloopfe.v4.problem.Problem, pytimeloop.timeloopfe.v4.problem.Shape, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimization, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimizationList, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimizationOption, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimizationOptionList, pytimeloop.timeloopfe.v4.sparse_optimizations.ComputeOptimization, pytimeloop.timeloopfe.v4.sparse_optimizations.ComputeOptimizationList, pytimeloop.timeloopfe.v4.sparse_optimizations.ComputeOptimizationTypeList, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationDataSpace, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationFormat, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationProblemDataspaceList, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationRank, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationRankList, pytimeloop.timeloopfe.v4.sparse_optimizations.SparseOptimizationGroup, pytimeloop.timeloopfe.v4.sparse_optimizations.SparseOptimizations, pytimeloop.timeloopfe.v4.specification.Specification, and pytimeloop.timeloopfe.v4.variables.Variables.
pytimeloop.timeloopfe.common.nodes.Node.__format__ | ( | self, | |
format_spec ) |
Formats the name of this node.
Any pytimeloop.timeloopfe.common.nodes.Node.__getitem__ | ( | self, | |
Union[str, int] | key ) |
Get the value at the given key or index.
Reimplemented in pytimeloop.timeloopfe.common.nodes.DictNode.
pytimeloop.timeloopfe.common.nodes.Node.__setitem__ | ( | self, | |
Union[str, int] | key, | ||
Any | value ) |
Set the value at the given key or index.
Reimplemented in pytimeloop.timeloopfe.common.nodes.DictNode.
pytimeloop.timeloopfe.common.nodes.Node.__str__ | ( | self | ) |
Return the name of this node.
Reimplemented in pytimeloop.timeloopfe.v4.constraints.Constraint.
|
protected |
Reimplemented in pytimeloop.timeloopfe.v4.arch.Component.
|
protected |
|
protected |
|
staticprotected |
|
protected |
Get the type specifiers for this node.
Attributes: spec (Specification): The global specification object.
Returns: Dict[str, TypeSpecifier]: The type specifiers for this node.
|
protected |
|
protected |
|
protected |
|
protected |
pytimeloop.timeloopfe.common.nodes.Node.add_attr | ( | cls, | |
str | key_or_tag, | ||
Optional[ Union[type, Tuple[type, ...], Tuple[None, ...], Tuple[str, ...], None] ] | required_type = None, | ||
Any | default = default_unspecified_, | ||
Optional[Callable] | callfunc = None, | ||
Optional[bool] | part_name_match = None, | ||
Optional[bool] | no_change_key = None, | ||
Any | _processor_responsible_for_removing = None, | ||
Optional[Dict[str, TypeSpecifier]] | _add_checker_to = None ) |
Initialize a type specifier for this class.
Args: key_or_tag: The key/tag or tag to use for this type specifier. required_type: The type of value that this type specifier will be default: The default value to use if the key/tag is not found. callfunc: A function to call on the value before returning it. part_name_match: If True, the key/tag will match if it is a substring of the actual key/tag. no_change_key: If True, a parsed key will not be changed when a partial name match is found. Otherwise, the parsed key will be changed to the actual key. _processor_responsible_for_removing: The processor that will be responsible for removing this key from the containing node, if any. _add_checker_to: The dictionary to add the checker to. If None, add the checker to the class's type specifiers.
Raises: AttributeError: If the class does not have a _param_type_specifiers attribute.
pytimeloop.timeloopfe.common.nodes.Node.check_unrecognized | ( | self, | |
bool | ignore_empty = False, | ||
ignore_should_have_been_removed_by = False ) |
Check for unrecognized keys in this node and all subnodes.
Also checks for correct types.
Args: ignore_empty (bool): Flag indicating whether to ignore empty nodes. ignore_should_have_been_removed_by (bool): Flag indicating whether to ignore nodes that should have been removed by a processor.
Raises: ParseError: If an unrecognized key is found.
Reimplemented in pytimeloop.timeloopfe.common.nodes.DictNode.
pytimeloop.timeloopfe.common.nodes.Node.clean_empties | ( | self | ) |
Remove empty nodes from this node and all subnodes.
Combine the value at the given key with the given value.
If there is no value at the given key, sets the value at the given key. If there is, attempts to combine the two values.
Args: key: The key to combine. value: The value to combine.
Returns: The combined value.
pytimeloop.timeloopfe.common.nodes.Node.declare_attrs | ( | cls, | |
* | args, | ||
** | kwargs ) |
Initialize the attributes of this node.
Reimplemented in pytimeloop.timeloopfe.common.base_specification.BaseSpecification, pytimeloop.timeloopfe.common.base_specification.BaseSpecification, pytimeloop.timeloopfe.common.base_specification.ProcessorListHolder, pytimeloop.timeloopfe.v4.arch.Architecture, pytimeloop.timeloopfe.v4.arch.ArchNodes, pytimeloop.timeloopfe.v4.arch.Attributes, pytimeloop.timeloopfe.v4.arch.Branch, pytimeloop.timeloopfe.v4.arch.Component, pytimeloop.timeloopfe.v4.arch.Compute, pytimeloop.timeloopfe.v4.arch.Container, pytimeloop.timeloopfe.v4.arch.Leaf, pytimeloop.timeloopfe.v4.arch.Network, pytimeloop.timeloopfe.v4.arch.Networks, pytimeloop.timeloopfe.v4.arch.Nothing, pytimeloop.timeloopfe.v4.arch.Spatial, pytimeloop.timeloopfe.v4.arch.Storage, pytimeloop.timeloopfe.v4.arch.StorageAttributes, pytimeloop.timeloopfe.v4.arch.StorageAttributes, pytimeloop.timeloopfe.v4.art.Art, pytimeloop.timeloopfe.v4.art.Table, pytimeloop.timeloopfe.v4.art.Tables, pytimeloop.timeloopfe.v4.components.Action, pytimeloop.timeloopfe.v4.components.ActionsList, pytimeloop.timeloopfe.v4.components.ActionSubcomponentsList, pytimeloop.timeloopfe.v4.components.ComponentAttributes, pytimeloop.timeloopfe.v4.components.Components, pytimeloop.timeloopfe.v4.components.ComponentsList, pytimeloop.timeloopfe.v4.components.CompoundComponent, pytimeloop.timeloopfe.v4.components.Subcomponent, pytimeloop.timeloopfe.v4.components.SubcomponentAction, pytimeloop.timeloopfe.v4.components.SubcomponentActionGroup, pytimeloop.timeloopfe.v4.components.SubcomponentActionList, pytimeloop.timeloopfe.v4.components.SubcomponentList, pytimeloop.timeloopfe.v4.constraints.Constraint, pytimeloop.timeloopfe.v4.constraints.ConstraintGroup, pytimeloop.timeloopfe.v4.constraints.Constraints, pytimeloop.timeloopfe.v4.constraints.ConstraintsList, pytimeloop.timeloopfe.v4.constraints.Dataspace, pytimeloop.timeloopfe.v4.constraints.Factors, pytimeloop.timeloopfe.v4.constraints.Iteration, pytimeloop.timeloopfe.v4.constraints.MaxOverbookedProportion, pytimeloop.timeloopfe.v4.constraints.Permutation, pytimeloop.timeloopfe.v4.constraints.ProblemDataspaceList, pytimeloop.timeloopfe.v4.constraints.Spatial, pytimeloop.timeloopfe.v4.constraints.Temporal, pytimeloop.timeloopfe.v4.constraints.Utilization, pytimeloop.timeloopfe.v4.ert.Action, pytimeloop.timeloopfe.v4.ert.ActionArguments, pytimeloop.timeloopfe.v4.ert.Actions, pytimeloop.timeloopfe.v4.ert.Ert, pytimeloop.timeloopfe.v4.ert.Table, pytimeloop.timeloopfe.v4.ert.Tables, pytimeloop.timeloopfe.v4.globals.AccelergyPlugIns, pytimeloop.timeloopfe.v4.globals.EnvironmentVariables, pytimeloop.timeloopfe.v4.globals.ExpressionCustomFunctions, pytimeloop.timeloopfe.v4.globals.Globals, pytimeloop.timeloopfe.v4.mapper.Mapper, pytimeloop.timeloopfe.v4.mapper.OptimizationMetrics, pytimeloop.timeloopfe.v4.mapspace.Mapspace, pytimeloop.timeloopfe.v4.problem.DataSpace, pytimeloop.timeloopfe.v4.problem.Density, pytimeloop.timeloopfe.v4.problem.DensityList, pytimeloop.timeloopfe.v4.problem.Instance, pytimeloop.timeloopfe.v4.problem.Problem, pytimeloop.timeloopfe.v4.problem.ProblemDataspaceList, pytimeloop.timeloopfe.v4.problem.Shape, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimization, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimizationList, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimizationOption, pytimeloop.timeloopfe.v4.sparse_optimizations.ActionOptimizationOptionList, pytimeloop.timeloopfe.v4.sparse_optimizations.ComputeOptimization, pytimeloop.timeloopfe.v4.sparse_optimizations.ComputeOptimizationList, pytimeloop.timeloopfe.v4.sparse_optimizations.ComputeOptimizationTypeList, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationDataSpace, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationFormat, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationProblemDataspaceList, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationRank, pytimeloop.timeloopfe.v4.sparse_optimizations.RepresentationRankList, pytimeloop.timeloopfe.v4.sparse_optimizations.SparseOptimizationGroup, pytimeloop.timeloopfe.v4.sparse_optimizations.SparseOptimizations, pytimeloop.timeloopfe.v4.sparse_optimizations.SparseOptimizationsList, pytimeloop.timeloopfe.v4.specification.Specification, and pytimeloop.timeloopfe.v4.variables.Variables.
Callable pytimeloop.timeloopfe.common.nodes.Node.get_combiner_lambda | ( | self, | |
Union[str, int] | keytag ) |
Get a function that can be used to combine a value to this node.
The combiner takes one argument, the value to combine.
Args: keytag: The key or tag to combine.
Returns: A function that can be used to combine a value to this node.
List[Tuple[Any, Callable]] pytimeloop.timeloopfe.common.nodes.Node.get_combiners_for_keytag | ( | self, | |
str | keytag, | ||
bool | recursive = True ) |
Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given key/tag.
A combiner is a function that can be used to combine a value to this node.
Args: keytag: The key or tag to search for. recursive: If True, search recursively.
List[Tuple[Any, Callable]] pytimeloop.timeloopfe.common.nodes.Node.get_combiners_for_type | ( | self, | |
Type | t, | ||
bool | recursive = True ) |
Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given type.
A combiner is a function that can be used to combine a value in this node.
Args: t: The type to search for. recursive: If True, search recursively.
Returns: A list of tuples of the form (value, combiner) for all keys/tags in this node that match the given type.
|
static |
Get the global specification object.
str pytimeloop.timeloopfe.common.nodes.Node.get_name | ( | self, | |
Union[Set, None] | seen = None ) |
Get the name of this node.
Return a list of all subnodes of a given type.
Args: node_type: The type of node to search for.
Returns: A list of all subnodes of the given type.
Callable pytimeloop.timeloopfe.common.nodes.Node.get_setter_lambda | ( | self, | |
Union[str, int] | keytag ) |
Get a function that can be used to set a value in this node.
The setter takes one argument, the value to set.
Args: keytag: The key or tag to set.
Returns: A function that can be used to set a value in this node.
List[Tuple[Any, Callable]] pytimeloop.timeloopfe.common.nodes.Node.get_setters_for_keytag | ( | self, | |
str | keytag, | ||
bool | recursive = True ) |
Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given key/tag.
A setter is a function that can be used to set a value in this node.
Args: keytag: The key or tag to search for. recursive: If True, search recursively.
List[Tuple[Any, Callable]] pytimeloop.timeloopfe.common.nodes.Node.get_setters_for_type | ( | self, | |
Type | t, | ||
bool | recursive = True ) |
Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given type.
A setter is a function that can be used to set a value in this node.
Args: t: The type to search for. recursive: If True, search recursively.
Returns: A list of tuples of the form (value, setter) for all keys/tags in this node that match the given type.
pytimeloop.timeloopfe.common.nodes.Node.get_specifiers_from_processors | ( | cls, | |
"BaseSpecification" | spec ) |
Get the specifiers that have been set from processors.
str pytimeloop.timeloopfe.common.nodes.Node.get_tag | ( | self | ) |
Get the tag of this node.
bool pytimeloop.timeloopfe.common.nodes.Node.is_defined_non_default_non_empty | ( | self, | |
str | key ) |
Returns True if the given key is defined in this node and is not the default value and is not empty.
bool pytimeloop.timeloopfe.common.nodes.Node.isempty | ( | self | ) |
Return True if this node is empty.
Good to override.
Reimplemented in pytimeloop.timeloopfe.v4.art.Art, pytimeloop.timeloopfe.v4.constraints.Constraint, pytimeloop.timeloopfe.v4.ert.Ert, and pytimeloop.timeloopfe.v4.sparse_optimizations.SparseOptimizationGroup.
bool pytimeloop.timeloopfe.common.nodes.Node.isempty_recursive | ( | self | ) |
Return True if this node or all subnodes are empty.
Iterable[Tuple[Union[str, int], Any]] pytimeloop.timeloopfe.common.nodes.Node.items | ( | self | ) |
Get iterable of (key, value) or (index, value) pairs.
pytimeloop.timeloopfe.common.nodes.Node.parse_expressions | ( | self, | |
Optional[Dict[str, Any]] | symbol_table = None, | ||
Optional[set] | parsed_ids = None, | ||
Optional[Callable] | callfunc = None ) |
Parse expressions in this node and all subnodes.
Args: symbol_table: A dictionary mapping variable names to values. parsed_ids: A set of IDs of nodes that have already been parsed. callfunc: A function to call on each node after parsing.
Reimplemented in pytimeloop.timeloopfe.common.base_specification.BaseSpecification, pytimeloop.timeloopfe.v4.arch.ArchNodes, pytimeloop.timeloopfe.v4.arch.Branch, pytimeloop.timeloopfe.v4.arch.Leaf, pytimeloop.timeloopfe.v4.components.Components, and pytimeloop.timeloopfe.v4.specification.Specification.
pytimeloop.timeloopfe.common.nodes.Node.recognize_all | ( | cls, | |
bool | recognize_all = True ) |
Set whether all attributes under this node should be recognized.
Attributes: recognize_all (bool): Flag indicating whether all attributes under this node should be recognized.
Any pytimeloop.timeloopfe.common.nodes.Node.recursive_apply | ( | self, | |
callable | func, | ||
bool | self_first = False, | ||
set | applied_to = None ) |
Apply a function to this node and all subnodes.
Args: func (callable): The function to apply. self_first (bool): Flag indicating whether to apply the function to this node before applying it to subnodes. applied_to (set): A set of ids of nodes that have already been visited. Prevents infinite recursion.
Returns: The return value of the function applied to this node.
pytimeloop.timeloopfe.common.nodes.Node.reset_processor_elems | ( | cls, | |
Optional[Type] | processor = None ) |
pytimeloop.timeloopfe.common.nodes.Node.reset_specifiers_from_processors | ( | cls, | |
Optional[Type] | processor = None ) |
Reset the specifiers that have been set from processors.
|
static |
Set the global specification object.
|
static |
Try to combine two values.
Args: a: The first value. b: The second value. innonde: The node that contains the values. For error messages. index: The index of the values in the node. For error messages.
Returns: The combined value.
pytimeloop.timeloopfe.common.nodes.Node.unique_class_name | ( | cls | ) |
Return a unique name for this class.
|
private |
|
protected |
|
protected |
pytimeloop.timeloopfe.common.nodes.Node.from_data = None |
pytimeloop.timeloopfe.common.nodes.Node.logger = logging.getLogger(self.__class__.__name__) |
Node pytimeloop.timeloopfe.common.nodes.Node.parent_node = None |
BaseSpecification pytimeloop.timeloopfe.common.nodes.Node.spec = Node.get_global_spec() |