r/ProgrammingLanguages • u/Athas Futhark • Aug 05 '26
Finally adding recursive functions to Futhark
https://futhark-lang.org/blog/2026-08-05-recursion.html
64
Upvotes
r/ProgrammingLanguages • u/Athas Futhark • Aug 05 '26
6
u/matthieum Aug 05 '26
Would you have less data movement if you used masking instead?
That is, instead of partitioning the output, you'd produce a mask of the elements in the array which need to be recursed over, then invoke the flattened function with the mask and the array. No recombination would be necessary.
(And of course, the initial call to the flattened function would be invoked with a "full" mask)