Reference Guide  2.5.0
psyclone.psyGen.Arguments Class Reference
Inheritance diagram for psyclone.psyGen.Arguments:

Public Member Functions

def __init__ (self, parent_call)
 
def psyir_expressions (self)
 
def names (self)
 
def args (self)
 
def iteration_space_arg (self)
 
def acc_args (self)
 
def scalars (self)
 
def append (self, name, argument_type)
 

Detailed Description

Arguments abstract base class.

:param parent_call: kernel call with which the arguments are associated.
:type parent_call: sub-class of :py:class:`psyclone.psyGen.Kern`

Definition at line 1887 of file psyGen.py.

Member Function Documentation

◆ acc_args()

def psyclone.psyGen.Arguments.acc_args (   self)
:returns: the list of quantities that must be available on an \
          OpenACC device before the associated kernel can be launched
:rtype: list of str

Reimplemented in psyclone.gocean1p0.GOKernelArguments, and psyclone.dynamo0p3.DynKernelArguments.

Definition at line 1944 of file psyGen.py.

1944  def acc_args(self):
1945  '''
1946  :returns: the list of quantities that must be available on an \
1947  OpenACC device before the associated kernel can be launched
1948  :rtype: list of str
1949  '''
1950  raise NotImplementedError(
1951  "Arguments.acc_args must be implemented in sub-class")
1952 

◆ append()

def psyclone.psyGen.Arguments.append (   self,
  name,
  argument_type 
)
 Abstract method to append KernelArguments to the Argument
list.

:param str name: name of the appended argument.
:param str argument_type: type of the appended argument.

Reimplemented in psyclone.gocean1p0.GOKernelArguments.

Definition at line 1962 of file psyGen.py.

1962  def append(self, name, argument_type):
1963  ''' Abstract method to append KernelArguments to the Argument
1964  list.
1965 
1966  :param str name: name of the appended argument.
1967  :param str argument_type: type of the appended argument.
1968  '''
1969  raise NotImplementedError(
1970  "Arguments.append must be implemented in sub-class")
1971 
1972 
Here is the caller graph for this function:

◆ iteration_space_arg()

def psyclone.psyGen.Arguments.iteration_space_arg (   self)
Returns an argument that can be iterated over, i.e. modified
(has WRITE, READWRITE or INC access), but not the result of
a reduction operation.

:returns: a Fortran argument name
:rtype: string
:raises GenerationError: if none such argument is found.

Reimplemented in psyclone.dynamo0p3.DynKernelArguments.

Definition at line 1924 of file psyGen.py.

1924  def iteration_space_arg(self):
1925  '''
1926  Returns an argument that can be iterated over, i.e. modified
1927  (has WRITE, READWRITE or INC access), but not the result of
1928  a reduction operation.
1929 
1930  :returns: a Fortran argument name
1931  :rtype: string
1932  :raises GenerationError: if none such argument is found.
1933 
1934  '''
1935  for arg in self._args:
1936  if arg.access in AccessType.all_write_accesses() and \
1937  arg.access not in AccessType.get_valid_reduction_modes():
1938  return arg
1939  raise GenerationError("psyGen:Arguments:iteration_space_arg Error, "
1940  "we assume there is at least one writer, "
1941  "reader/writer, or increment as an argument")
1942 

References psyclone.dynamo0p3.DynKernelArguments._args, psyclone.gocean1p0.GOKernelArguments._args, psyclone.parse.algorithm.ParsedCall._args, and psyclone.psyGen.Arguments._args.

◆ names()

def psyclone.psyGen.Arguments.names (   self)
:returns: the Algorithm-visible kernel arguments in a \
          comma-delimited string.
:rtype: str

Definition at line 1912 of file psyGen.py.

1912  def names(self):
1913  '''
1914  :returns: the Algorithm-visible kernel arguments in a \
1915  comma-delimited string.
1916  :rtype: str
1917  '''
1918  return ",".join([arg.name for arg in self.args])
1919 

References psyclone.dynamo0p3.DynKernelArguments._args, psyclone.gocean1p0.GOKernelArguments._args, psyclone.parse.algorithm.ParsedCall._args, psyclone.psyGen.Arguments._args, psyclone.expression.FunctionVar.args, psyclone.f2pygen.SubroutineGen.args(), psyclone.parse.algorithm.ParsedCall.args(), psyclone.psyGen.GlobalSum.args(), psyclone.psyGen.HaloExchange.args(), psyclone.psyGen.Kern.args(), psyclone.psyGen.Arguments.args(), and psyclone.psyir.nodes.node.Node.args().

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

◆ psyir_expressions()

def psyclone.psyGen.Arguments.psyir_expressions (   self)
:returns: the PSyIR expressions representing this Argument list.
:rtype: list of :py:class:`psyclone.psyir.nodes.Node`

Reimplemented in psyclone.gocean1p0.GOKernelArguments, and psyclone.dynamo0p3.DynKernelArguments.

Definition at line 1904 of file psyGen.py.

1904  def psyir_expressions(self):
1905  '''
1906  :returns: the PSyIR expressions representing this Argument list.
1907  :rtype: list of :py:class:`psyclone.psyir.nodes.Node`
1908 
1909  '''
1910 

◆ scalars()

def psyclone.psyGen.Arguments.scalars (   self)
:returns: the list of scalar quantities belonging to this object
:rtype: list of str

Reimplemented in psyclone.gocean1p0.GOKernelArguments, and psyclone.dynamo0p3.DynKernelArguments.

Definition at line 1954 of file psyGen.py.

1954  def scalars(self):
1955  '''
1956  :returns: the list of scalar quantities belonging to this object
1957  :rtype: list of str
1958  '''
1959  raise NotImplementedError(
1960  "Arguments.scalars must be implemented in sub-class")
1961 

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