Reference Guide  2.5.0
psyclone.transformations.GOceanOMPLoopTrans Class Reference
Inheritance diagram for psyclone.transformations.GOceanOMPLoopTrans:
Collaboration diagram for psyclone.transformations.GOceanOMPLoopTrans:

Public Member Functions

def __init__ (self, omp_directive="do", omp_schedule="static")
 
def __str__ (self)
 
def validate (self, node, options=None)
 
- Public Member Functions inherited from psyclone.psyir.transformations.omp_loop_trans.OMPLoopTrans
def omp_directive (self)
 
def omp_directive (self, value)
 
def omp_schedule (self)
 
def omp_schedule (self, value)
 
def apply (self, node, options=None)
 
- Public Member Functions inherited from psyclone.psyir.transformations.loop_trans.LoopTrans
def name (self)
 

Additional Inherited Members

- Public Attributes inherited from psyclone.psyir.transformations.omp_loop_trans.OMPLoopTrans
 omp_schedule
 
 omp_directive
 
- Static Public Attributes inherited from psyclone.psyir.transformations.parallel_loop_trans.ParallelLoopTrans
tuple excluded_node_types = (nodes.Return, psyGen.HaloExchange, nodes.CodeBlock)
 
- Static Public Attributes inherited from psyclone.psyir.transformations.loop_trans.LoopTrans
tuple excluded_node_types = ()
 

Detailed Description

 GOcean-specific orphan OpenMP loop transformation. Adds GOcean
    specific validity checks (that the node is either an inner or outer
    Loop).

    :param str omp_directive: choose which OpenMP loop directive to use. \
        Defaults to "do".
    :param str omp_schedule: the OpenMP schedule to use. Must be one of \
        'runtime', 'static', 'dynamic', 'guided' or 'auto'. Defaults to \
        'static'.

Definition at line 932 of file transformations.py.

Member Function Documentation

◆ validate()

def psyclone.transformations.GOceanOMPLoopTrans.validate (   self,
  node,
  options = None 
)
Checks that the supplied node is a valid target for parallelisation
using OMP directives.

:param node: the candidate loop for parallelising using OMP Do.
:type node: :py:class:`psyclone.psyir.nodes.Loop`
:param options: a dictionary with options for transformations.
:type options: Optional[Dict[str, Any]]

:raises TransformationError: if the loop_type of the supplied Loop is \
                             not "inner" or "outer".

Reimplemented from psyclone.psyir.transformations.parallel_loop_trans.ParallelLoopTrans.

Definition at line 952 of file transformations.py.

952  def validate(self, node, options=None):
953  '''
954  Checks that the supplied node is a valid target for parallelisation
955  using OMP directives.
956 
957  :param node: the candidate loop for parallelising using OMP Do.
958  :type node: :py:class:`psyclone.psyir.nodes.Loop`
959  :param options: a dictionary with options for transformations.
960  :type options: Optional[Dict[str, Any]]
961 
962  :raises TransformationError: if the loop_type of the supplied Loop is \
963  not "inner" or "outer".
964 
965  '''
966  super().validate(node, options=options)
967 
968  # Check we are either an inner or outer loop
969  if node.loop_type not in ["inner", "outer"]:
970  raise TransformationError("Error in "+self.name+" transformation."
971  " The requested loop is not of type "
972  "inner or outer.")
973 
974 

References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.name, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.GridArg.name, psyclone.domain.gocean.transformations.gocean_const_loop_bounds_trans.GOConstLoopBoundsTrans.name(), psyclone.domain.gocean.transformations.gocean_move_iteration_boundaries_inside_kernel_trans.GOMoveIterationBoundariesInsideKernelTrans.name(), psyclone.domain.gocean.transformations.gocean_opencl_trans.GOOpenCLTrans.name(), psyclone.domain.lfric.kernel.lfric_kernel_metadata.LFRicKernelMetadata.name, psyclone.domain.nemo.transformations.create_nemo_invoke_schedule_trans.CreateNemoInvokeScheduleTrans.name(), psyclone.domain.nemo.transformations.create_nemo_psy_trans.CreateNemoPSyTrans.name(), psyclone.domain.nemo.transformations.nemo_allarrayrange2loop_trans.NemoAllArrayRange2LoopTrans.name(), psyclone.domain.nemo.transformations.nemo_arrayrange2loop_trans.NemoArrayRange2LoopTrans.name(), psyclone.domain.nemo.transformations.nemo_outerarrayrange2loop_trans.NemoOuterArrayRange2LoopTrans.name(), psyclone.dynamo0p3.DynamoPSy.name(), psyclone.expression.FunctionVar.name, psyclone.expression.NamedArg.name(), psyclone.gocean1p0.GOKernelGridArgument.name(), psyclone.gocean1p0.GOStencil.name(), psyclone.parse.algorithm.FileInfo.name(), psyclone.parse.algorithm.InvokeCall.name(), psyclone.parse.kernel.KernelProcedure.name(), psyclone.parse.kernel.KernelType.name(), psyclone.parse.module_info.ModuleInfo.name(), psyclone.psyad.transformations.assignment_trans.AssignmentTrans.name(), psyclone.psyGen.PSy.name(), psyclone.psyGen.Invoke.name(), psyclone.psyGen.Kern.name(), psyclone.psyGen.CodedKern.name, psyclone.psyGen.Argument.name(), psyclone.psyGen.Transformation.name(), psyclone.psyGen.DummyTransformation.name(), psyclone.psyir.nodes.container.Container.name, psyclone.psyir.nodes.member.Member.name, psyclone.psyir.nodes.reference.Reference.name(), psyclone.psyir.nodes.routine.Routine.name, psyclone.psyir.symbols.symbol.Symbol.name(), psyclone.psyir.transformations.allarrayaccess2loop_trans.AllArrayAccess2LoopTrans.name(), psyclone.psyir.transformations.arrayrange2loop_trans.ArrayRange2LoopTrans.name(), psyclone.psyir.transformations.fold_conditional_return_expressions_trans.FoldConditionalReturnExpressionsTrans.name(), psyclone.psyir.transformations.loop_trans.LoopTrans.name(), psyclone.psyir.transformations.omp_task_trans.OMPTaskTrans.name(), psyclone.psyir.transformations.psy_data_trans.PSyDataTrans.name(), psyclone.transformations.OMPSingleTrans.name(), psyclone.transformations.OMPMasterTrans.name(), psyclone.transformations.OMPParallelTrans.name(), psyclone.transformations.MoveTrans.name(), psyclone.transformations.Dynamo0p3AsyncHaloExchangeTrans.name(), psyclone.transformations.Dynamo0p3KernelConstTrans.name(), psyclone.transformations.ACCEnterDataTrans.name(), psyclone.transformations.ACCRoutineTrans.name(), psyclone.transformations.ACCKernelsTrans.name(), psyclone.transformations.ACCDataTrans.name(), and psyclone.transformations.KernelImportsToArguments.name().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: