MeteoSwiss-APN / dawn

Compiler toolchain to enable generation of high-level DSLs for geophysical fluid dynamics models
MIT License
28 stars 30 forks source link

Set dimensions of tmp fields #636

Open Stagno opened 4 years ago

Stagno commented 4 years ago

Creating a temporary field on unstructured grids is currently unsupported (https://github.com/MeteoSwiss-APN/dawn/pull/602). If going from local variable to temporary field we should use the information contained in LocalVariableData.type_ to determine the dimensions of the temp field. Otherwise use the containing stage's location type. Passes involved are: PassInilining, PassSetNonTempCaches, TemporaryHandling.

ofuhrer commented 4 years ago

Minor comment: if this checker is used to infer dimensions, "TypeChecker" probably is no longer the right name.

Stagno commented 4 years ago

Minor comment: if this checker is used to infer dimensions, "TypeChecker" probably is no longer the right name.

Agree. The implementation of the type checker can be decoupled into a routine that infers the dimensions of an expression and into another one that does the checks. The former can be reused for this. Should this change the DoD of this task?

Stagno commented 4 years ago

After further discussion we decided it is better to postpone this task as this information would be available from the stage location type. But first we should fix the stage's location type #592