Peano
Loading...
Searching...
No Matches
PropagateUseStatements.py File Reference

Go to the source code of this file.

Namespaces

namespace  peano4
 
namespace  peano4.api
 
namespace  peano4.api.taskgraph
 The task graph abstraction allows users to formalise their solver steps over small task graphs which are then lowered into a sequence of Peano mesh traversals.
 
namespace  peano4.api.taskgraph.compiler
 Compilers are simple functions.
 
namespace  peano4.api.taskgraph.compiler.PropagateUseStatements
 

Functions

bool peano4.api.taskgraph.compiler.PropagateUseStatements.propagate_use_statements (List[List["peano4.api.solversteps.Step"]] sequences, Optional[List[Tuple[List["peano4.api.solversteps.Step"], List["peano4.api.solversteps.Step"]]]] edges=None)
 Derive whichever further use_cell()/use_face()/use_vertex() declarations a set of compiled step sequences need so that every submodel they write is safely handed on to whoever reads it next.
 
bool peano4.api.taskgraph.compiler.PropagateUseStatements._create_submodels_read_before_written (Dict[int, List] steps_of_sequence, List[Tuple[int, int]] edges, str attribute_name, str access_attribute_name, str use_method_name)
 Add a WRITE declaration to the last step of an entry sequence for every submodel that can be read before it is ever written -.
 
bool peano4.api.taskgraph.compiler.PropagateUseStatements._upgrade_discards_followed_by_reads (Dict[int, List] steps_of_sequence, List[Tuple[int, int]] edges, str attribute_name, str access_attribute_name)
 Upgrade every READ_AND_DISCARD declaration to READ_AND_WRITE if a later step still reads the submodel before any step writes it again -.
 
 peano4.api.taskgraph.compiler.PropagateUseStatements._step_backward (sequence, index, steps_of_sequence, predecessors_of_sequence)
 The exact reverse of _step_forward(): yield every (sequence, index) that can immediately reach (sequence, index) - the previous step in the same sequence if there is one, or otherwise the last step of every sequence declared (via edges) to lead into this one.
 
bool peano4.api.taskgraph.compiler.PropagateUseStatements._upgrade_writes_immediately_following_read_and_write (Dict[int, List] steps_of_sequence, List[Tuple[int, int]] edges, str attribute_name, str access_attribute_name)
 A plain WRITE is normally treated as a fresh, independent production that supersedes whatever came before (.
 
bool peano4.api.taskgraph.compiler.PropagateUseStatements._propagate_use_statements_for_one_kind (Dict[int, List] steps_of_sequence, List[Tuple[int, int]] edges, str attribute_name, str access_attribute_name, str use_method_name)
 
 peano4.api.taskgraph.compiler.PropagateUseStatements._step_forward (sequence, index, steps_of_sequence, successors_of_sequence)
 Yield every (sequence, index) immediately reachable from (sequence, index) - the next step in the same sequence if there is one, or otherwise the first step of every declared successor sequence (several, if a sequence may be followed by more than one other).
 
 peano4.api.taskgraph.compiler.PropagateUseStatements._find_next_consecutive_uses (origin_sequence, origin_index, submodel, attribute_name, access_attribute_name, steps_of_sequence, successors_of_sequence)
 Breadth-first search forward from (origin_sequence, origin_index), stopping each path the moment it reaches a step that declares a READ_AND_DISCARD, WRITE or READ_AND_WRITE use of submodel (a TEMPORARY declaration is transparent to this search -.
 
bool peano4.api.taskgraph.compiler.PropagateUseStatements._fix_forward_gap (origin_sequence, origin_index, submodel, steps_of_sequence, successors_of_sequence, attribute_name, access_attribute_name, use_method_name)