Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, module=None, base_class=None) |
def | list (self) |
def | num_trans (self) |
def | get_trans_num (self, number) |
def | get_trans_name (self, name) |
This class provides information about, and access, to the available transformations in this implementation of PSyclone. New transformations will be picked up automatically as long as they subclass the abstract Transformation class. For example: >>> from psyclone.psyGen import TransInfo >>> t = TransInfo() >>> print(t.list) There is 1 transformation available: 1: SwapTrans, A test transformation >>> # accessing a transformation by index >>> trans = t.get_trans_num(1) >>> # accessing a transformation by name >>> trans = t.get_trans_name("SwapTrans")
def psyclone.psyGen.TransInfo.__init__ | ( | self, | |
module = None , |
|||
base_class = None |
|||
) |
if module and/or baseclass are provided then use these else use the default module "Transformations" and the default base_class "Transformation"
Definition at line 2654 of file psyGen.py.
References psyclone.domain.lfric.lfric_invokes.LFRicInvokes._0_to_n, psyclone.dynamo0p3.DynKernelArguments._0_to_n, psyclone.gocean1p0.GOInvokes._0_to_n, psyclone.gocean1p0.GOKernelArguments._0_to_n, psyclone.psyGen.TransInfo._0_to_n, psyclone.psyGen.TransInfo._classes, psyclone.psyGen.TransInfo._find_subclasses(), psyclone.psyGen.TransInfo._obj_map, and psyclone.psyGen.TransInfo._objects.
def psyclone.psyGen.TransInfo.get_trans_name | ( | self, | |
name | |||
) |
return the transformation with this name (use list() first to see available transformations)
Definition at line 2724 of file psyGen.py.
References psyclone.psyGen.TransInfo._obj_map.
def psyclone.psyGen.TransInfo.get_trans_num | ( | self, | |
number | |||
) |
return the transformation with this number (use list() first to see available transformations)
Definition at line 2717 of file psyGen.py.
References psyclone.psyGen.TransInfo._objects.
def psyclone.psyGen.TransInfo.list | ( | self | ) |
return a string with a human readable list of the available transformations
Definition at line 2697 of file psyGen.py.
References psyclone.psyGen.TransInfo._objects.
def psyclone.psyGen.TransInfo.num_trans | ( | self | ) |
return the number of transformations available
Definition at line 2713 of file psyGen.py.
References psyclone.psyGen.TransInfo._objects.