psyclone.core.access_type

This module implements the AccessType used throughout PSyclone.

Classes

  • AccessType: A simple enum-class for the various valid access types.

class psyclone.core.access_type.AccessType(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

A simple enum-class for the various valid access types.

Inheritance

Inheritance diagram of AccessType
static all_read_accesses()
Returns:

A list of all access types that involve reading an argument in some form.

Return type:

List of py:class:psyclone.core.access_type.AccessType.

static all_write_accesses()
Returns:

A list of all access types that involve writing to an argument in some form.

Return type:

List of py:class:psyclone.core.access_type.AccessType.

api_specific_name()

This convenience function returns the name of the type in the current API. E.g. in a dynamo0.3 API, WRITE –> “gh_write” :returns: The API specific name. :rtype: str

static from_string(access_string)

Convert a string (e.g. “read”) into the corresponding AccessType enum value (AccessType.READ).

Parameters:

access_string (str) – Access type as string.

Returns:

Corresponding AccessType enum.

Raises:

ValueError if access_string is not a valid access type.

static get_valid_reduction_modes()
Returns:

A list of valid reduction access modes.

Return type:

List of py:class:psyclone.core.access_type.AccessType.

static get_valid_reduction_names()
Returns:

A list of valid reduction access names.

Return type:

List of strings.