Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, arg) |
def | overlaps (self, arg) |
def | reset_coverage (self) |
def | update_coverage (self, arg) |
def | covered (self) |
A helper class to simplify the determination of dependencies due to overlapping accesses to data associated with instances of the Argument class.
def psyclone.psyGen.DataAccess.__init__ | ( | self, | |
arg | |||
) |
Store the argument associated with the instance of this class and the Call, HaloExchange or GlobalSum (or a subclass thereof) instance with which the argument is associated. :param arg: the argument that we are concerned with. An \ argument can be found in a `Kern` a `HaloExchange` or a \ `GlobalSum` (or a subclass thereof) :type arg: :py:class:`psyclone.psyGen.Argument`
Definition at line 1980 of file psyGen.py.
References psyclone.gocean1p0.GOKernelArgument._arg, psyclone.psyGen.DataAccess._arg, psyclone.psyGen.KernelArgument._arg, psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, psyclone.psyGen.DataAccess._covered, psyclone.psyGen.DataAccess._vector_index_access, and psyclone.psyGen.DataAccess.reset_coverage().
def psyclone.psyGen.DataAccess.covered | ( | self | ) |
Returns True if all of the data associated with this argument has been covered by the arguments provided in update_coverage :return bool: True if all of an argument is covered by \ previous accesses and False if not.
Definition at line 2115 of file psyGen.py.
References psyclone.psyGen.DataAccess._covered.
def psyclone.psyGen.DataAccess.overlaps | ( | self, | |
arg | |||
) |
Determine whether the accesses to the provided argument overlap with the accesses of the source argument. Overlap means that the accesses share at least one memory location. For example, the arguments both access the 1st index of the same field. We do not currently deal with accesses to a subset of an argument (unless it is a vector). This distinction will need to be added once loop splitting is supported. :param arg: the argument to compare with our internal argument :type arg: :py:class:`psyclone.psyGen.Argument` :return bool: True if there are overlapping accesses between \ arguments (i.e. accesses share at least one memory \ location) and False if not.
Definition at line 2003 of file psyGen.py.
References psyclone.gocean1p0.GOKernelArgument._arg, psyclone.psyGen.DataAccess._arg, psyclone.psyGen.KernelArgument._arg, psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, and psyclone.psyGen.Argument._call.
def psyclone.psyGen.DataAccess.reset_coverage | ( | self | ) |
Reset internal state to allow re-use of the object for a different situation.
Definition at line 2044 of file psyGen.py.
References psyclone.psyGen.DataAccess._covered, and psyclone.psyGen.DataAccess._vector_index_access.
def psyclone.psyGen.DataAccess.update_coverage | ( | self, | |
arg | |||
) |
Record any overlap between accesses to the supplied argument and the internal argument. Overlap means that the accesses to the two arguments share at least one memory location. If the overlap results in all of the accesses to the internal argument being covered (either directly or as a combination with previous arguments) then ensure that the covered() method returns True. Covered means that all memory accesses by the internal argument have at least one corresponding access by the supplied arguments. :param arg: the argument used to compare with our internal \ argument in order to update coverage information :type arg: :py:class:`psyclone.psyGen.Argument`
Definition at line 2056 of file psyGen.py.
References psyclone.gocean1p0.GOKernelArgument._arg, psyclone.psyGen.DataAccess._arg, psyclone.psyGen.KernelArgument._arg, psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, psyclone.psyGen.DataAccess._covered, psyclone.psyGen.DataAccess._vector_index_access, and psyclone.psyGen.DataAccess.overlaps().