Skip to content
Snippets Groups Projects

pymbolic extension: Typed Variables, Constants, and LinearizedArray

pymbolic extension: Typed Variables, Constants, and LinearizedArray

Closed Task created by Frederik Hennig Updated
Assignees
None
Labels
None
None
Dates
None
pystencils Backend Rework

The pymbolic class hierarchy needs to be extended with a number of typed expressions, in particular for typed variables and constants.

PsTypedVariable

The PsTypedVariable class shall be a direct subclass of the pymbolic Variable, annotating a name with a type. In the backend, it takes the position of the old TypedSymbol.

PsTypedConstant

pymbolic allows the injection of arbitrary types for constants, as long as they implement the arithmetic operators. We shall utilize this by introducing PsTypedConstant to model constants annotated with types in the backend, to make sure that all operations (e.g. constant folding) respect the type's behaviour.

Linearized Arrays

To model linearized multi-dimensional arrays, we introduce the class PsLinearizedArray to the backend. We may model accesses to such arrays using a sublcass of pymbolic.Subscript, linked to a particular array instance.

Edited by Frederik Hennig

Linked Items

Show labels

Link items together to show that they're related or that one is blocking others. Learn more.

Activity

  • All activity
  • Comments only
  • History only
  • Newest first
  • Oldest first
Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading