psyclone.psyir.symbols.routinesymbol#
This module contains the RoutineSymbol.
Classes#
RoutineSymbol: Symbol identifying a callable routine.
- class psyclone.psyir.symbols.routinesymbol.RoutineSymbol(name, datatype=None, **kwargs)[source]#
Symbol identifying a callable routine.
- Parameters:
name (str) – name of the symbol.
datatype (
psyclone.psyir.symbols.DataType) – data type of the symbol. Default to NoType().kwargs (unwrapped dict.) – additional keyword arguments provided by
psyclone.psyir.symbols.TypedSymbol
Inheritance

- copy()[source]#
Create and return a copy of this object. Any references to the original will not be affected so the copy will not be referred to by any other object.
- Returns:
A symbol object with the same properties as this symbol object.
- Return type:
- copy_properties(symbol_in, exclude_interface=False)[source]#
Replace all properties in this object with the properties from symbol_in, apart from the name (which is immutable) and visibility.
- Parameters:
symbol_in (
RoutineSymbol) – the symbol from which the properties are copied.exclude_interface (
bool) – whether or not to copy the interface property of the provided Symbol (default is to include it).
- Raises:
TypeError – if the argument is not the expected type.
- property is_elemental#
- Returns:
whether the routine represented by this Symbol is elemental (acts element-by-element on supplied array arguments) or None if this is not known.
- Return type:
bool | NoneType
- property is_pure#
- Returns:
whether the routine represented by this Symbol has no side effects (guarantees that the routine always returns the same result for a given set of inputs).
- Return type:
bool | NoneType