psyclone.domain.lfric.lfric_kern_metadata
This module implements the PSyclone LFRic API by capturing the Kernel subroutine code and metadata describing the subroutine for the LFRic API.
Classes
LFRicKernMetadata
: Captures the Kernel subroutine code and metadata describing
- class psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata(ast, name=None)
Captures the Kernel subroutine code and metadata describing the subroutine for the LFRic API.
- Parameters:
ast (
fparser.block_statements.BeginSource
) – fparser1 AST for the kernel.name (str) – the name of this kernel.
- Raises:
ParseError – if the metadata does not conform to the rules for the LFRic API.
Inheritance
- property cma_operation
Returns the type of CMA operation identified from the kernel metadata (one of ‘assembly’, ‘apply’ or ‘matrix-matrix’) or None if the kernel does not involve CMA operators
- property eval_shapes
Returns the shape(s) of evaluator required by this kernel or an empty string if none.
- Returns:
the shape(s) of the evaluator (one of VALID_EVALUATOR_SHAPES) or an empty list if the kernel does not require one.
- Return type:
list
- property eval_targets
Returns the list of function spaces upon which any evaluator must be provided. This list is obtained from the GH_EVALUATOR_TARGETS metadata entry (if present). If this is not specified in the metadata then we default to providing evaluators on all of the function spaces associated with the arguments which this kernel updates.
- Returns:
list of the names of the function spaces (as they appear in kernel metadata) upon which any evaluator must be provided.
- Return type:
list of str
- property func_descriptors
Returns metadata about the function spaces within a Kernel. This metadata is provided within Kernel code via the meta_funcs variable. Information is returned as a list of DynFuncDescriptor03 objects, one for each function space.
- property is_intergrid
Returns whether or not this is an inter-grid kernel.
- Returns:
True if kernel is an inter-grid kernel, False otherwise
- Return type:
bool