futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.Pass.FirstOrderTransform

Description

Transform any SOACs to `for`-loops.

Example:

    let ys = map (x -> x + 2) xs

becomes something like:

    let out = scratch n i32
    let ys =
      loop (ys' = out) for i < n do
        let x = xs[i]
        let y = x + 2
        let ys'[i] = y
        in ys'

Synopsis

- firstOrderTransform :: FirstOrderRep rep => Pass SOACS rep

# Documentation

firstOrderTransform :: FirstOrderRep rep => Pass SOACS rep Source #

The first-order transformation pass.