Reference Guide
2.5.0
|
Public Member Functions | |
def | validate (self, node, options=None) |
def | name (self) |
Public Member Functions inherited from psyclone.psyGen.Transformation | |
def | apply (self, node, options=None) |
Static Public Attributes | |
tuple | excluded_node_types = () |
This abstract class is a base class for all transformations that act on a Loop node. It gives access to a validate function that makes sure that the supplied node is a Loop. We also check that all nodes to be enclosed are valid for this transformation - this requires that the sub-class populate the `excluded_node_types` tuple.
Definition at line 48 of file loop_trans.py.
def psyclone.psyir.transformations.loop_trans.LoopTrans.name | ( | self | ) |
:returns: the name of this class. :rtype: str
Reimplemented from psyclone.psyGen.Transformation.
Reimplemented in psyclone.psyir.transformations.omp_task_trans.OMPTaskTrans.
Definition at line 133 of file loop_trans.py.
References psyclone.psyir.symbols.symbol.Symbol.__class__.
def psyclone.psyir.transformations.loop_trans.LoopTrans.validate | ( | self, | |
node, | |||
options = None |
|||
) |
Checks that the supplied node is a valid target for a loop transformation. :param node: target PSyIR node. :type node: subclass of :py:class:`psyclone.psyir.nodes.Node` :param options: a dictionary with options for transformations. :type options: Optional[Dict[str, Any]] :param bool options["node-type-check"]: this flag controls if the \ type of the nodes enclosed in the loop should be tested to \ avoid including unsupported nodes in a transformation. :raises TransformationError: if the supplied node is not a (fully- \ formed) Loop. :raises TransformationError: if any of the nodes within the loop are \ of an unsupported type. :raises TransformationError: if the loop is of 'null' type. :raises TransformationError: if the supplied options are not a \ dictionary.
Reimplemented from psyclone.psyGen.Transformation.
Reimplemented in psyclone.transformations.Dynamo0p3RedundantComputationTrans, psyclone.transformations.GOceanOMPLoopTrans, psyclone.transformations.Dynamo0p3OMPLoopTrans, psyclone.transformations.DynamoOMPParallelLoopTrans, psyclone.psyir.transformations.parallel_loop_trans.ParallelLoopTrans, psyclone.psyir.transformations.omp_task_trans.OMPTaskTrans, psyclone.psyir.transformations.loop_tiling_2d_trans.LoopTiling2DTrans, psyclone.psyir.transformations.loop_swap_trans.LoopSwapTrans, psyclone.psyir.transformations.hoist_loop_bound_expr_trans.HoistLoopBoundExprTrans, and psyclone.psyir.transformations.chunk_loop_trans.ChunkLoopTrans.
Definition at line 64 of file loop_trans.py.
References psyclone.psyir.transformations.extract_trans.ExtractTrans.excluded_node_types, psyclone.psyir.transformations.loop_swap_trans.LoopSwapTrans.excluded_node_types, psyclone.psyir.transformations.loop_trans.LoopTrans.excluded_node_types, psyclone.psyir.transformations.omp_target_trans.OMPTargetTrans.excluded_node_types, psyclone.psyir.transformations.parallel_loop_trans.ParallelLoopTrans.excluded_node_types, psyclone.psyir.transformations.profile_trans.ProfileTrans.excluded_node_types, psyclone.psyir.transformations.psy_data_trans.PSyDataTrans.excluded_node_types, psyclone.psyir.transformations.region_trans.RegionTrans.excluded_node_types, psyclone.transformations.ACCLoopTrans.excluded_node_types, psyclone.transformations.ParallelRegionTrans.excluded_node_types, psyclone.transformations.OMPSingleTrans.excluded_node_types, psyclone.transformations.OMPMasterTrans.excluded_node_types, psyclone.transformations.OMPParallelTrans.excluded_node_types, psyclone.transformations.ACCParallelTrans.excluded_node_types, psyclone.transformations.ACCKernelsTrans.excluded_node_types, and psyclone.transformations.ACCDataTrans.excluded_node_types.