Codegen: View Shadows Array in NestedSDFG
- Dominant language
- Python
- Stars
- 593
- Forks
- 163
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 60
Description
I have a strange error, after some experiments I have concluded the following:
- There is a nested SDFG that has a transient of name, e.g. "X".
- In the parent SDFG there is a view that has the same name, i.e. "X"
In that case the code generator will generate for the nested SDFG:
```c++
X = new float[N];
```
without declaring `X`, i.e. the line `float* X`, that should precede the allocation, is missing.
Currently I have only a big SDFG that has this pattern.
The error vanishes, once I rename the view in the top level SDFG or turn it into an array.
I added the SDFG and scripts that shows I "fixed" the error.
I will also try to come up with a smaller example.
[example.zip](https://github.com/user-attachments/files/16095040/example.zip)
Contributor guide
Assessment
This issue has not been assessed yet.