Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self) |
def | __str__ (self) |
def | name (self) |
def | validate (self, node_list, options=None) |
Public Member Functions inherited from psyclone.transformations.ParallelRegionTrans | |
def | apply (self, target_nodes, options=None) |
Public Member Functions inherited from psyclone.psyir.transformations.region_trans.RegionTrans | |
def | get_node_list (self, nodes) |
Static Public Attributes | |
tuple | excluded_node_types |
Static Public Attributes inherited from psyclone.transformations.ParallelRegionTrans | |
tuple | excluded_node_types = (CodeBlock, Return, psyGen.HaloExchange) |
Static Public Attributes inherited from psyclone.psyir.transformations.region_trans.RegionTrans | |
tuple | excluded_node_types = () |
Create an OpenMP PARALLEL region by inserting directives. For example: >>> from psyclone.parse.algorithm import parse >>> from psyclone.parse.utils import ParseError >>> from psyclone.psyGen import PSyFactory >>> from psyclone.errors import GenerationError >>> api = "gocean1.0" >>> ast, invokeInfo = parse(GOCEAN_SOURCE_FILE, api=api) >>> psy = PSyFactory(api).create(invokeInfo) >>> >>> from psyclone.psyGen import TransInfo >>> t = TransInfo() >>> ltrans = t.get_trans_name('GOceanOMPLoopTrans') >>> rtrans = t.get_trans_name('OMPParallelTrans') >>> >>> schedule = psy.invokes.get('invoke_0').schedule >>> # Uncomment the following line to see a text view of the schedule >>> # print(schedule.view()) >>> >>> # Apply the OpenMP Loop transformation to *every* loop >>> # in the schedule >>> for child in schedule.children: >>> ltrans.apply(child) >>> >>> # Enclose all of these loops within a single OpenMP >>> # PARALLEL region >>> rtrans.apply(schedule.children) >>> # Uncomment the following line to see a text view of the schedule >>> # print(schedule.view())
Definition at line 1467 of file transformations.py.
def psyclone.transformations.OMPParallelTrans.name | ( | self | ) |
:returns: the name of this transformation as a string. :rtype: str
Reimplemented from psyclone.psyGen.Transformation.
Definition at line 1514 of file transformations.py.
def psyclone.transformations.OMPParallelTrans.validate | ( | self, | |
node_list, | |||
options = None |
|||
) |
Perform OpenMP-specific validation checks. :param node_list: list of Nodes to put within parallel region. :type node_list: list 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 region should be tested \ to avoid using unsupported nodes inside a region. :raises TransformationError: if the target Nodes are already within \ some OMP parallel region.
Reimplemented from psyclone.transformations.ParallelRegionTrans.
Definition at line 1521 of file transformations.py.
|
static |
Definition at line 1502 of file transformations.py.