Skip to content
Snippets Groups Projects

Revised Array Modelling & Memory Model

Merged Frederik Hennig requested to merge fhennig/array-modelling into v2.0-dev

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply