Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, symbol, **kwargs) |
def | __eq__ (self, other) |
def | is_array (self) |
def | symbol (self) |
def | symbol (self, symbol) |
def | name (self) |
def | node_str (self, colour=True) |
def | __str__ (self) |
def | get_signature_and_indices (self) |
def | reference_accesses (self, var_accesses) |
def | datatype (self) |
def | previous_access (self) |
def | next_access (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 | 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 | scope (self) |
def | replace_with (self, node, keep_name_in_context=True) |
def | pop_all_children (self) |
def | detach (self) |
def | copy (self) |
def | validate_global_constraints (self) |
def | debug_string (self) |
def | origin_string (self) |
def | update_signal (self) |
def | path_from (self, ancestor) |
Public Attributes | |
symbol | |
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() | |
Node representing a Reference Expression. :param symbol: the symbol being referenced. :type symbol: :py:class:`psyclone.psyir.symbols.Symbol` :param kwargs: additional keyword arguments provided to the super class. :type kwargs: unwrapped dict.
Definition at line 50 of file reference.py.
def psyclone.psyir.nodes.reference.Reference.__eq__ | ( | self, | |
other | |||
) |
Checks equivalence of two References. References are considered equivalent if they are the same type of Reference and their symbol name is the same. :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 69 of file reference.py.
References psyclone.psyir.nodes.reference.Reference.symbol.
def psyclone.psyir.nodes.reference.Reference.datatype | ( | self | ) |
:returns: the datatype of this reference. :rtype: :py:class:`psyclone.psyir.symbols.DataType`
Reimplemented from psyclone.psyir.nodes.datanode.DataNode.
Reimplemented in psyclone.psyir.nodes.structure_reference.StructureReference, and psyclone.psyir.nodes.array_reference.ArrayReference.
Definition at line 182 of file reference.py.
References psyclone.psyir.nodes.reference.Reference.symbol.
def psyclone.psyir.nodes.reference.Reference.get_signature_and_indices | ( | self | ) |
:returns: the Signature of this reference, and \ an empty list of lists as 'indices' since this reference does \ not represent an array access. :rtype: tuple(:py:class:`psyclone.core.Signature`, list of \ list of indices)
Reimplemented in psyclone.psyir.nodes.structure_reference.StructureReference.
Definition at line 146 of file reference.py.
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().
def psyclone.psyir.nodes.reference.Reference.is_array | ( | self | ) |
:returns: whether this reference is an array, False if it can not be determined. :rtype: bool
Definition at line 88 of file reference.py.
References psyclone.psyir.nodes.reference.Reference.symbol.
def psyclone.psyir.nodes.reference.Reference.name | ( | self | ) |
Return the name of the referenced symbol. :returns: Name of the referenced symbol. :rtype: str
Definition at line 123 of file reference.py.
References psyclone.psyir.nodes.reference.Reference._symbol.
def psyclone.psyir.nodes.reference.Reference.next_access | ( | self | ) |
:returns: the next reference to the same symbol. :rtype: Optional[:py:class:`psyclone.psyir.nodes.Node`]
Definition at line 224 of file reference.py.
References psyclone.psyir.nodes.node.Node.ancestor(), psyclone.psyir.nodes.array_mixin.ArrayMixin.get_signature_and_indices(), psyclone.psyir.nodes.array_of_structures_mixin.ArrayOfStructuresMixin.get_signature_and_indices(), psyclone.psyir.nodes.member.Member.get_signature_and_indices(), psyclone.psyir.nodes.reference.Reference.get_signature_and_indices(), psyclone.psyir.nodes.structure_member.StructureMember.get_signature_and_indices(), psyclone.psyir.nodes.structure_reference.StructureReference.get_signature_and_indices(), psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().
def psyclone.psyir.nodes.reference.Reference.node_str | ( | self, | |
colour = True |
|||
) |
Create a text description of this node in the schedule, optionally including control codes for colour. :param bool colour: whether or not to include colour control codes. :return: text description of this node. :rtype: str
Reimplemented from psyclone.psyir.nodes.node.Node.
Definition at line 132 of file reference.py.
References psyclone.domain.common.algorithm.psyir.AlgorithmInvokeCall.node_str(), psyclone.domain.common.psylayer.psyloop.PSyLoop.node_str(), psyclone.domain.lfric.lfric_invoke_schedule.LFRicInvokeSchedule.node_str(), psyclone.domain.lfric.lfric_loop.LFRicLoop.node_str(), psyclone.dynamo0p3.LFRicHaloExchange.node_str(), psyclone.psyGen.InvokeSchedule.node_str(), psyclone.psyGen.GlobalSum.node_str(), psyclone.psyGen.HaloExchange.node_str(), psyclone.psyGen.Kern.node_str(), psyclone.psyGen.CodedKern.node_str(), psyclone.psyGen.InlinedKern.node_str(), psyclone.psyir.nodes.acc_directives.ACCLoopDirective.node_str(), psyclone.psyir.nodes.call.Call.node_str(), psyclone.psyir.nodes.codeblock.CodeBlock.node_str(), psyclone.psyir.nodes.container.Container.node_str(), psyclone.psyir.nodes.file_container.FileContainer.node_str(), psyclone.psyir.nodes.literal.Literal.node_str(), psyclone.psyir.nodes.loop.Loop.node_str(), psyclone.psyir.nodes.member.Member.node_str(), psyclone.psyir.nodes.node.Node.node_str(), psyclone.psyir.nodes.omp_clauses.OMPDefaultClause.node_str(), psyclone.psyir.nodes.omp_clauses.OMPScheduleClause.node_str(), psyclone.psyir.nodes.omp_clauses.OMPDependClause.node_str(), psyclone.psyir.nodes.omp_directives.OMPDoDirective.node_str(), psyclone.psyir.nodes.omp_directives.OMPLoopDirective.node_str(), psyclone.psyir.nodes.operation.Operation.node_str(), psyclone.psyir.nodes.reference.Reference.node_str(), and psyclone.psyir.nodes.routine.Routine.node_str().
def psyclone.psyir.nodes.reference.Reference.previous_access | ( | self | ) |
:returns: the previous reference to the same symbol. :rtype: Optional[:py:class:`psyclone.psyir.nodes.Node`]
Definition at line 195 of file reference.py.
References psyclone.psyir.nodes.node.Node.ancestor(), psyclone.psyir.nodes.array_mixin.ArrayMixin.get_signature_and_indices(), psyclone.psyir.nodes.array_of_structures_mixin.ArrayOfStructuresMixin.get_signature_and_indices(), psyclone.psyir.nodes.member.Member.get_signature_and_indices(), psyclone.psyir.nodes.reference.Reference.get_signature_and_indices(), psyclone.psyir.nodes.structure_member.StructureMember.get_signature_and_indices(), psyclone.psyir.nodes.structure_reference.StructureReference.get_signature_and_indices(), psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().
def psyclone.psyir.nodes.reference.Reference.reference_accesses | ( | self, | |
var_accesses | |||
) |
Get all variable access information from this node, i.e. it sets this variable to be read. It relies on `get_signature_and_indices` and will correctly handle array expressions. :param var_accesses: VariablesAccessInfo instance that stores the \ information about variable accesses. :type var_accesses: \ :py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.psyir.nodes.node.Node.
Definition at line 155 of file reference.py.
References psyclone.psyir.nodes.array_mixin.ArrayMixin.get_signature_and_indices(), psyclone.psyir.nodes.array_of_structures_mixin.ArrayOfStructuresMixin.get_signature_and_indices(), psyclone.psyir.nodes.member.Member.get_signature_and_indices(), psyclone.psyir.nodes.reference.Reference.get_signature_and_indices(), psyclone.psyir.nodes.structure_member.StructureMember.get_signature_and_indices(), psyclone.psyir.nodes.structure_reference.StructureReference.get_signature_and_indices(), and psyclone.psyir.nodes.reference.Reference.symbol.
def psyclone.psyir.nodes.reference.Reference.symbol | ( | self | ) |
Return the referenced symbol. :returns: the referenced symbol. :rtype: :py:class:`psyclone.psyir.symbols.Symbol`
Definition at line 98 of file reference.py.
References psyclone.psyir.nodes.reference.Reference._symbol.
def psyclone.psyir.nodes.reference.Reference.symbol | ( | self, | |
symbol | |||
) |
:param symbol: the new symbol being referenced. :type symbol: :py:class:`psyclone.psyir.symbols.Symbol` :raises TypeError: if the symbol argument is not of type Symbol.
Definition at line 108 of file reference.py.
References psyclone.psyir.nodes.reference.Reference._symbol.