Nektar++
|
Public Member Functions | |
def | __init__ |
def | update |
def | suitable |
def | reason |
Public Attributes | |
has_var | |
bad_vars | |
has_func | |
table_var | |
Represents the state for lookup table analysis.
Definition at line 479 of file optimize.py.
def CellMLToNektar.optimize.LookupTableAnalyser.LUTState.__init__ | ( | self | ) |
Set the initial state. We assume at first a lookup table would not be suitable.
Definition at line 481 of file optimize.py.
def CellMLToNektar.optimize.LookupTableAnalyser.LUTState.reason | ( | self | ) |
Return a unicode string describing why this state indicates the expression is not suitable for replacement with a lookup table. This can be: 'no_var' - doesn't contain the table variable 'bad_var <vname>' - contains a variable which isn't permitted 'no_func' - doesn't contain an expensive function or a comma separated combination of the above.
Definition at line 517 of file optimize.py.
References CellMLToNektar.optimize.LookupTableAnalyser.LUTState.bad_vars, CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_func, and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_var.
def CellMLToNektar.optimize.LookupTableAnalyser.LUTState.suitable | ( | self | ) |
Return True iff this state indicates a suitable expression for replacement with a lookup table.
Definition at line 511 of file optimize.py.
References CellMLToNektar.optimize.LookupTableAnalyser.LUTState.bad_vars, CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_func, and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_var.
def CellMLToNektar.optimize.LookupTableAnalyser.LUTState.update | ( | self, | |
res | |||
) |
Update the state with the results of a recursive call. res is the result of checking a sub-expression for suitability, and should be another instance of this class.
Definition at line 491 of file optimize.py.
References CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_func, CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_var, and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.table_var.
CellMLToNektar.optimize.LookupTableAnalyser.LUTState.bad_vars |
Definition at line 487 of file optimize.py.
Referenced by CellMLToNektar.optimize.LookupTableAnalyser.LUTState.reason(), and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.suitable().
CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_func |
Definition at line 488 of file optimize.py.
Referenced by CellMLToNektar.optimize.LookupTableAnalyser.LUTState.reason(), CellMLToNektar.optimize.LookupTableAnalyser.LUTState.suitable(), and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.update().
CellMLToNektar.optimize.LookupTableAnalyser.LUTState.has_var |
Definition at line 486 of file optimize.py.
Referenced by CellMLToNektar.optimize.LookupTableAnalyser.LUTState.reason(), CellMLToNektar.optimize.LookupTableAnalyser.LUTState.suitable(), and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.update().
CellMLToNektar.optimize.LookupTableAnalyser.LUTState.table_var |
Definition at line 489 of file optimize.py.
Referenced by CellMLToNektar.optimize.LookupTableAnalyser.is_keying_var(), and CellMLToNektar.optimize.LookupTableAnalyser.LUTState.update().