psyclone.domain.gocean#

Module for the GOcean domain.

Submodules#

Classes#

  • GOceanConstants: This class stores all GOcean constants. It stores all values in

  • GOceanDriverCreator: This class provides the functionality to create a driver that

  • GOSymbolTable: Sub-classes SymbolTable to provide a GOcean-specific implementation.

class psyclone.domain.gocean.GOceanConstants[source]#

This class stores all GOcean constants. It stores all values in class variables (to avoid re-evaluating them).

Inheritance

Inheritance diagram of GOceanConstants
static get_valid_access_types()[source]#

Return the valid access types for the GOcean API. Reads the values from the config file the first time the method is called.

Returns:

valid access types for the GOcean API.

Return type:

list[str]

class psyclone.domain.gocean.GOceanDriverCreator(integer_type=<psyclone.psyir.symbols.datatypes.ScalarType object>, real_type=<psyclone.psyir.symbols.datatypes.ScalarType object>, region_name=None)[source]#

This class provides the functionality to create a driver that reads in extracted data produced by using the PSyData kernel-extraction functionality.

Parameters:
  • integer_type (ScalarType) – default scalar integer type to be used for integer variables. Defaults to INTEGER_TYPE.

  • real_type (ScalarType) – default scalar real type to be used for real variables. Defaults to REAL8_TYPE.

  • region_name (Optional[tuple[str, str]]) – Suggested region name.

Inheritance

Inheritance diagram of GOceanDriverCreator
handle_precision_symbols(symbol_table)[source]#

Replaces the precisions with the values given in the _default_types in order to avoid imported precision symbols.

Parameters:

program – the PSyIR Routine in which to replace the symbols.

Return type:

None

class psyclone.domain.gocean.GOSymbolTable(node=None, default_visibility=Visibility.PUBLIC)[source]#

Sub-classes SymbolTable to provide a GOcean-specific implementation.

Inheritance

Inheritance diagram of GOSymbolTable
static create_from_table(old_table)[source]#

Create a GOSymbolTable instance from the supplied SymbolTable.

Parameters:

old_table (psyclone.psyir.symbols.SymbolTable) – the generic SymbolTable from which to create a new GOSymbolTable.

Returns:

a new GOSymbolTable containing all of the symbols in the supplied table.

Return type:

psyclone.gocean1p0.GOSymbolTable

Raises:

TypeError – if the supplied argument is not a SymbolTable.

property data_arguments#

In the GOcean API the data arguments start from the third item in the argument list.

Returns:

the symbols representing the data arguments.

Return type:

List[psyclone.psyir.symbols.DataSymbol]

property iteration_indices#

In the GOcean API the two first kernel arguments are the iteration indices.

Returns:

the symbols representing the iteration indices.

Return type:

List[psyclone.psyir.symbols.DataSymbol]