Revised Array Modelling & Memory Model
All threads resolved!
All threads resolved!
This MR revises the way C arrays, as well as heap memory and pointers, are modelled and translated by pystencils.
Changes concerning arrays:
- Change
PsArrayType
to receive a fixed, n-dimensional, nonempty shape, and a non-const, non-array element type - Change
PsSubscript
to only work on arrays via an n-dimensional index tuple - Change
PsArrayInitList
to an n-dimensional matrix of expressions - Add contextual and default typing for array declarations and inline array literals
Changes concerning pointers and memory:
- Remove
PsDeref
- Introduce
PsMemAcc
to access memory by pointers - Assume all non-field raw pointers to be aliases of each other, adapt loop-invariant code motion accordingly
- Introduce
mem_acc
front-end function for accessing memory by pointer in SymPy
Changes to the typifier:
- Remove constness handling from the type context; only work with non-const data types while processing expressions
- In
PsAssignment
, use a seperate algorithm to determine the mutated memory object and its constness
Merge request reports
Activity
changed milestone to %Release 2.0
requested review from @he66coqe
assigned to @da15siwa
added 1 commit
- 95a195ea - Add scalar shapes to array type; generalize to SupportsIndex
- Resolved by Frederik Hennig
- Resolved by Frederik Hennig
added 1 commit
- 72531dc1 - fix typifier documentation, rename `items_matrix` to `items_grid`.
enabled an automatic merge when the pipeline for 72531dc1 succeeds
mentioned in commit e0945b63
mentioned in task #102 (closed)
mentioned in task #99 (closed)
mentioned in commit lbmpy@7f6f3a57
Please register or sign in to reply