stanford-ppl / spatial

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
https://spatial.stanford.edu
MIT License
271 stars 33 forks source link

Access patterns with specific cases of || and && #303

Open mattfel1 opened 4 years ago

mattfel1 commented 4 years ago

For example, someone may do

Foreach(8 by 1){ i => 
  .. = mem(16 | i)
  .. = mem(16 | (i + 1))

Right now, the compiler would either crash or set II = 2 to be able to do this. But if it knows the space of i, it should recognize that this | is effectively an add.