futhark-0.17.3: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

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

Documentation

firstOrderTransform :: FirstOrderLore lore => Pass SOACS lore Source #

The first-order transformation pass.