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

Safe Haskell | None
Language | GHC2021

Futhark.Pass.ExtractKernels.ISRWIM

Description

Interchanging scans with inner maps.

Synopsis

- iswim :: (MonadBuilder m, Rep m ~ SOACS) => Pat Type -> SubExp -> Lambda SOACS -> [(SubExp, VName)] -> Maybe (m ())
- irwim :: (MonadBuilder m, Rep m ~ SOACS) => Pat Type -> SubExp -> Commutativity -> Lambda SOACS -> [(SubExp, VName)] -> Maybe (m ())
- rwimPossible :: Lambda SOACS -> Maybe (Pat Type, StmAux (), SubExp, Lambda SOACS)

# Documentation

iswim :: (MonadBuilder m, Rep m ~ SOACS) => Pat Type -> SubExp -> Lambda SOACS -> [(SubExp, VName)] -> Maybe (m ()) Source #

Interchange Scan With Inner Map. Tries to turn a `scan(map)` into a @map(scan)

irwim :: (MonadBuilder m, Rep m ~ SOACS) => Pat Type -> SubExp -> Commutativity -> Lambda SOACS -> [(SubExp, VName)] -> Maybe (m ()) Source #

Interchange Reduce With Inner Map. Tries to turn a `reduce(map)` into a @map(reduce)

rwimPossible :: Lambda SOACS -> Maybe (Pat Type, StmAux (), SubExp, Lambda SOACS) Source #

Does this reduce operator contain an inner map, and if so, what does that map look like?