psyclone.domain.lfric.kern_call_acc_arg_list

This module implements a class that manages all of the data references that must be copied over to a GPU before executing the kernel. Ordering of the parameters does not matter apart from where we have members of derived types. In that case, the derived type itself must be specified first before any members.

Classes

class psyclone.domain.lfric.kern_call_acc_arg_list.KernCallAccArgList(kern)

Kernel call arguments that need to be declared by OpenACC directives. KernCallArgList only needs to be specialised where modified, or additional, arguments are required. Scalars are apparently not required but it is valid in OpenACC to include them and requires less specialisation to keep them in.

Inheritance

Inheritance diagram of KernCallAccArgList
cell_map(var_accesses=None)

Add cell-map to the list of required arrays.

Parameters:

var_accesses (Optional[ psyclone.core.VariablesAccessInfo]) – optional VariablesAccessInfo instance to store the information about variable accesses.

cell_position(var_accesses=None)

Adds a cell argument to the argument list and if supplied stores this access in var_accesses. Although normally just a scalar, the cell argument may actually require a lookup from a colour map array. Either way, this method adds the name of the variable to the argument list.

Parameters:

var_accesses (Optional[ psyclone.core.VariablesAccessInfo]) – optional VariablesAccessInfo instance to store the information about variable accesses.

fs_compulsory_field(function_space, var_accesses=None)

Add compulsory arguments associated with this function space to the list. OpenACC requires the full function-space map to be specified. If supplied it also stores this access in var_accesses.

Parameters:
fs_intergrid(function_space, var_accesses=None)

Add arrays that need to be uploaded for inter-grid kernels. These arrays contain the mapping between fine and coarse meshes.

Parameters:
operator(arg, var_accesses=None)

Add the operator arguments if they have not already been added. OpenACC requires the derived type and the dereferenced data to be specified. If supplied it also stores this access in var_accesses.

Parameters:
scalar(scalar_arg, var_accesses=None)

Override the default implementation as there’s no need to specify scalars for an OpenACC data region.

Parameters:
stencil(arg, var_accesses=None)

Add general stencil information associated with the argument ‘arg’ to the argument list. OpenACC requires the full dofmap to be specified. If supplied it also stores this access in var_accesses.

Parameters:
stencil_2d(arg, var_accesses=None)

Add general 2D stencil information associated with the argument ‘arg’ to the argument list. OpenACC requires the full dofmap to be specified. If supplied it also stores this access in var_accesses.This method passes through to the stencil method.

Parameters:
stencil_2d_unknown_extent(arg, var_accesses=None)

Add 2D stencil information to the argument list associated with the argument ‘arg’ if the extent is unknown. If supplied it also stores this access in var_accesses. This method passes through to the stencil_unknown_extent method.

Parameters:
stencil_unknown_extent(arg, var_accesses=None)

Add stencil information to the argument list associated with the argument ‘arg’ if the extent is unknown. If supplied it also stores this access in var_accesses.

Parameters: