Exemplo n.º 1
0
    def __init__(self, invoke, ast):
        Node.__init__(self)
        NemoFparser2ASTProcessor.__init__(self)

        self._invoke = invoke
        self._ast = ast
        self.process_nodes(self, ast.content, ast)
Exemplo n.º 2
0
    def __init__(self, invoke, ast):
        # pylint: disable=super-init-not-called, non-parent-init-called
        Node.__init__(self)
        NemoFparser2ASTProcessor.__init__(self)

        self._invoke = invoke
        self._ast = ast
        self.process_nodes(self, ast.content, ast)
Exemplo n.º 3
0
    def __init__(self, invoke, ast):
        # pylint: disable=super-init-not-called, non-parent-init-called
        Node.__init__(self)
        NemoFparser2Reader.__init__(self)

        self._invoke = invoke
        self._ast = ast
        # Whether or not we've already checked the associated Fortran for
        # potential name-clashes when inserting profiling code.
        # TODO this can be removed once #435 is done and we're no longer
        # manipulating the fparser2 parse tree.
        self._name_clashes_checked = False

        self.process_nodes(self, ast.content, ast)
Exemplo n.º 4
0
    def __init__(self, children=None, parent=None):
        Node.__init__(self, children=children, parent=parent)

        # Store the name of the profile variable that is used for this
        # profile name. This allows to show the variable name in __str__
        # (and also if we would call create_name in gen(), the name would
        # change every time gen() is called).
        self._var_name = NameSpaceFactory().create().create_name("profile")

        # Name of the region. In general at constructor time we might not
        # have a parent subroutine or a child for the kernel, so we leave
        # the name empty for now. The region and module names are set the
        # first time gen() is called (and then remain unchanged).
        self._region_name = None
        self._module_name = None
Exemplo n.º 5
0
    def __init__(self, children=None, parent=None):
        '''Constructor for a ProfileNode that is inserted in a schedule.
        Parameters:
            :param children: A list of children nodes for this node.
            :type children: A list of :py::class::`psyclone.psyGen.Node` \
            or derived classes.
            :param parent: The parent of this node.
            :type parent: A :py::class::`psyclone.psyGen.Node`.
        '''
        Node.__init__(self, children=children, parent=parent)

        # Store the name of the profile variable that is used for this
        # profile name. This allows to show the variable name in __str__
        # (and also if we would call create_name in gen(), the name would
        # change every time gen() is called).
        self._var_name = NameSpaceFactory().create().create_name("profile")

        # Name of the region. In general at constructor time we might not
        # have a parent subroutine or a child for the kernel, so we leave
        # the name empty for now. The region and module names are set the
        # first time gen() is called (and then remain unchanged).
        self._region_name = None
        self._module_name = None