Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, collapse=None, independent=True, sequential=False, gang=False, vector=False, **kwargs) |
def | __eq__ (self, other) |
def | collapse (self) |
def | collapse (self, value) |
def | independent (self) |
def | sequential (self) |
def | gang (self) |
def | vector (self) |
def | node_str (self, colour=True) |
def | validate_global_constraints (self) |
def | gen_code (self, parent) |
def | begin_string (self, leading_acc=True) |
def | end_string (self) |
Public Member Functions inherited from psyclone.psyir.nodes.acc_directives.ACCRegionDirective | |
def | signatures (self) |
Public Member Functions inherited from psyclone.psyir.nodes.directive.RegionDirective | |
def | __init__ (self, ast=None, children=None, parent=None) |
def | dir_body (self) |
def | clauses (self) |
def | gen_post_region_code (self, parent) |
Public Member Functions inherited from psyclone.psyir.nodes.directive.Directive | |
def | create_data_movement_deep_copy_refs (self) |
Public Member Functions inherited from psyclone.psyir.nodes.node.Node | |
def | __init__ (self, ast=None, children=None, parent=None, annotations=None) |
def | coloured_name (self, colour=True) |
def | __str__ (self) |
def | ast (self) |
def | ast_end (self) |
def | ast (self, ast) |
def | ast_end (self, ast_end) |
def | annotations (self) |
def | dag (self, file_name='dag', file_format='svg') |
def | dag_gen (self, graph) |
def | dag_name (self) |
def | args (self) |
def | backward_dependence (self) |
def | forward_dependence (self) |
def | is_valid_location (self, new_node, position="before") |
def | depth (self) |
def | view (self, depth=0, colour=True, indent=" ", _index=None) |
def | addchild (self, child, index=None) |
def | children (self) |
def | children (self, my_children) |
def | parent (self) |
def | siblings (self) |
def | has_constructor_parent (self) |
def | position (self) |
def | abs_position (self) |
def | root (self) |
def | sameParent (self, node_2) |
def | walk (self, my_type, stop_type=None, depth=None) |
def | get_sibling_lists (self, my_type, stop_type=None) |
def | ancestor (self, my_type, excluding=None, include_self=False, limit=None, shared_with=None) |
def | kernels (self) |
def | following (self, routine=True) |
def | preceding (self, reverse=False, routine=True) |
def | immediately_precedes (self, node_2) |
def | immediately_follows (self, node_1) |
def | coded_kernels (self) |
def | loops (self) |
def | reductions (self, reprod=None) |
def | is_openmp_parallel (self) |
def | lower_to_language_level (self) |
def | reference_accesses (self, var_accesses) |
def | scope (self) |
def | replace_with (self, node, keep_name_in_context=True) |
def | pop_all_children (self) |
def | detach (self) |
def | copy (self) |
def | debug_string (self) |
def | origin_string (self) |
def | update_signal (self) |
def | path_from (self, ancestor) |
Public Member Functions inherited from psyclone.psyir.nodes.commentable_mixin.CommentableMixin | |
def | preceding_comment (self) |
def | preceding_comment (self, comment) |
def | inline_comment (self) |
def | inline_comment (self, comment) |
Public Attributes | |
collapse | |
independent | |
sequential | |
gang | |
vector | |
Public Attributes inherited from psyclone.psyir.nodes.node.Node | |
position | |
Additional Inherited Members | |
Static Public Attributes inherited from psyclone.psyir.nodes.node.Node | |
int | START_DEPTH = 0 |
int | START_POSITION = 0 |
valid_annotations = tuple() | |
Class managing the creation of a '!$acc loop' OpenACC directive. :param int collapse: Number of nested loops to collapse into a single iteration space or None. :param bool independent: Whether or not to add the `independent` clause to the loop directive. :param bool sequential: whether or not to add the `seq` clause to the loop directive. :param bool gang: whether or not to add the `gang` clause to the loop directive. :param bool vector: whether or not to add the `vector` clause to the loop directive. :param kwargs: additional keyword arguments provided to the super class. :type kwargs: unwrapped dict.
Definition at line 381 of file acc_directives.py.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.__eq__ | ( | self, | |
other | |||
) |
Checks whether two nodes are equal. Two ACCLoopDirective nodes are equal if their collapse, independent, sequential, gang, and vector members are equal. :param object other: the object to check equality to. :returns: whether other is equal to self. :rtype: bool
Reimplemented from psyclone.psyir.nodes.node.Node.
Definition at line 407 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective.collapse, psyclone.psyir.nodes.omp_directives.OMPDoDirective.collapse, psyclone.psyir.nodes.omp_directives.OMPLoopDirective.collapse, psyclone.psyir.nodes.acc_directives.ACCLoopDirective.gang, psyclone.psyir.nodes.acc_directives.ACCLoopDirective.independent, psyclone.psyir.nodes.acc_directives.ACCLoopDirective.sequential, psyclone.domain.lfric.kernel.common_meta_arg_metadata.CommonMetaArgMetadata.vector, psyclone.domain.lfric.kernel.field_vector_arg_metadata.FieldVectorArgMetadata.vector, psyclone.domain.lfric.kernel.inter_grid_vector_arg_metadata.InterGridVectorArgMetadata.vector, and psyclone.psyir.nodes.acc_directives.ACCLoopDirective.vector.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.begin_string | ( | self, | |
leading_acc = True |
|||
) |
Returns the opening statement of this directive, i.e. "acc loop" plus any qualifiers. If `leading_acc` is False then the leading "acc loop" text is not included. :param bool leading_acc: whether or not to include the leading \ "acc loop" in the text that is returned. :returns: the opening statement of this directive. :rtype: str
Definition at line 561 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._collapse, psyclone.psyir.nodes.omp_directives.OMPDoDirective._collapse, psyclone.psyir.nodes.omp_directives.OMPLoopDirective._collapse, psyclone.psyir.nodes.acc_directives.ACCLoopDirective._gang, psyclone.transformations.ACCLoopTrans._gang, psyclone.psyir.nodes.acc_directives.ACCLoopDirective._independent, psyclone.transformations.ACCLoopTrans._independent, psyclone.psyir.nodes.acc_directives.ACCLoopDirective._sequential, psyclone.transformations.ACCLoopTrans._sequential, psyclone.psyir.nodes.acc_directives.ACCLoopDirective._vector, and psyclone.transformations.ACCLoopTrans._vector.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.collapse | ( | self | ) |
:returns: the number of nested loops to collapse into a single \ iteration space for this node. :rtype: int or None
Definition at line 428 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._collapse, psyclone.psyir.nodes.omp_directives.OMPDoDirective._collapse, and psyclone.psyir.nodes.omp_directives.OMPLoopDirective._collapse.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.collapse | ( | self, | |
value | |||
) |
:param value: optional number of nested loop to collapse into a \ single iteration space to parallelise. Defaults to None. :type value: Optional[int] :raises TypeError: if the collapse value given is not an integer \ or NoneType. :raises ValueError: if the collapse integer given is not positive.
Definition at line 437 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._collapse, psyclone.psyir.nodes.omp_directives.OMPDoDirective._collapse, and psyclone.psyir.nodes.omp_directives.OMPLoopDirective._collapse.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.end_string | ( | self | ) |
Would return the end string for this directive but "acc loop" doesn't have a closing directive. :returns: empty string. :rtype: str
Definition at line 590 of file acc_directives.py.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.gang | ( | self | ) |
:returns: whether or not the `gang` clause is added to this loop directive. :rtype: bool
Definition at line 481 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._gang, and psyclone.transformations.ACCLoopTrans._gang.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.gen_code | ( | self, | |
parent | |||
) |
Generate the f2pygen AST entries in the Schedule for this OpenACC loop directive. :param parent: the parent Node in the Schedule to which to add our content. :type parent: sub-class of :py:class:`psyclone.f2pygen.BaseGen` :raises GenerationError: if this "!$acc loop" is not enclosed within \ an ACC Parallel region.
Definition at line 539 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCRoutineDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCEnterDataDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCParallelDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCKernelsDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCDataDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCUpdateDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCAtomicDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPDeclareTargetDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPTaskwaitDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPSingleDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPMasterDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPParallelDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPTaskloopDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPDoDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPParallelDoDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPTargetDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPLoopDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPAtomicDirective.begin_string(), psyclone.psyir.nodes.omp_directives.OMPSimdDirective.begin_string(), psyclone.psyir.nodes.omp_task_directive.OMPTaskDirective.begin_string(), psyclone.psyir.nodes.acc_directives.ACCLoopDirective.begin_string(), psyclone.f2pygen.BaseGen.children(), psyclone.psyGen.InlinedKern.children, psyclone.psyir.nodes.node.Node.children(), psyclone.domain.lfric.lfric_kern.LFRicKern.validate_global_constraints(), psyclone.psyir.nodes.acc_directives.ACCRegionDirective.validate_global_constraints(), psyclone.psyir.nodes.acc_directives.ACCLoopDirective.validate_global_constraints(), psyclone.psyir.nodes.acc_directives.ACCAtomicDirective.validate_global_constraints(), psyclone.psyir.nodes.node.Node.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPDeclareTargetDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPTaskwaitDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPSerialDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPParallelDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPTaskloopDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPDoDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPParallelDoDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPLoopDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPAtomicDirective.validate_global_constraints(), psyclone.psyir.nodes.omp_directives.OMPSimdDirective.validate_global_constraints(), and psyclone.psyir.nodes.omp_task_directive.OMPTaskDirective.validate_global_constraints().
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.independent | ( | self | ) |
Returns whether the independent clause will be added to this loop directive. :returns: whether the independent clause will be added to this loop \ directive. :rtype: bool
Definition at line 461 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._independent, and psyclone.transformations.ACCLoopTrans._independent.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.node_str | ( | self, | |
colour = True |
|||
) |
Returns the name of this node with (optional) control codes to generate coloured output in a terminal that supports it. :param bool colour: whether or not to include colour control codes. :returns: description of this node, possibly coloured. :rtype: str
Reimplemented from psyclone.psyir.nodes.node.Node.
Definition at line 498 of file acc_directives.py.
References psyclone.psyir.nodes.node.Node.coloured_name().
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.sequential | ( | self | ) |
:returns: whether or not the `seq` clause is added to this loop \ directive. :rtype: bool
Definition at line 472 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._sequential, and psyclone.transformations.ACCLoopTrans._sequential.
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.validate_global_constraints | ( | self | ) |
Perform validation of those global constraints that can only be done at code-generation time. :raises GenerationError: if this ACCLoopDirective is not enclosed within some OpenACC parallel or kernels region and is not in a Routine that has been marked up with an 'ACC Routine' directive.
Reimplemented from psyclone.psyir.nodes.acc_directives.ACCRegionDirective.
Definition at line 516 of file acc_directives.py.
References psyclone.psyir.nodes.node.Node.ancestor().
def psyclone.psyir.nodes.acc_directives.ACCLoopDirective.vector | ( | self | ) |
:returns: whether or not the `vector` clause is added to this loop directive. :rtype: bool
Definition at line 490 of file acc_directives.py.
References psyclone.psyir.nodes.acc_directives.ACCLoopDirective._vector, and psyclone.transformations.ACCLoopTrans._vector.