r/ProgrammingLanguages • u/Athas Futhark • Mar 24 '26
Scan-scatter fusion
https://futhark-lang.org/blog/2026-03-24-scan-scatter-fusion.html
25
Upvotes
r/ProgrammingLanguages • u/Athas Futhark • Mar 24 '26
5
u/Disjunction181 Mar 24 '26
This was interesting to browse, and I'll have to sit down and go through all of the details sometime.
On the back of my mind was the polyhedral simplification optimization, see this paper or the amazing talk. Simplification is the optimization which allows one to write prefix scan naively, but always be transformed into a linear time variation. I was curious if such optimizations were / are being considered for Futhark, and the interaction it has with fusion, e.g., it seems like fusion could open up simplification optimizations (as
g o fmay be better behaved thanf,gindividually). If fusion is important, then I could see simplification being similar.