TECH Signal 397
Futhark proposes flatmap SOAC to handle irregular arrays without general language support
Illustration only Photo by Anders Jildén on Unsplash
Futhark is exploring a new flatmap second-order array combinator to allow programmers to work with irregular arrays, leveraging the compiler's existing flattening transformation.
This allows Futhark programs to express algorithms like recursive quicksort that naturally produce subarrays of varying sizes. It provides this capability without the compilation overhead of fully supporting irregular arrays in the type system.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
Futhark restricts irregular arrays because of compilation efficiency and its size type system.
The compiler's flattening transformation already handles irregular arrays as intermediate results by encoding them as regular arrays.
A proposed flatmap SOAC exposes this capability to programmers, enabling algorithms like recursive quicksort.
THE CLUSTER