Safe Haskell | None |
---|---|

Language | Haskell98 |

Simplify running `accelerate`

functions
with multiple curried array and expression arguments.

# Documentation

If you have a function:

f :: Exp a -> (Acc b, Acc c) -> (Acc d, Acc e)

you cannot run this immediately using `run1`

,
since `run1`

expects a function
with a single `Acc`

parameter and a single `Acc`

result.
Using the `with`

function you can just run `f`

as is:

with run1 f :: a -> (b,c) -> (d,e)

with :: C f => ((Acc (Arguments () f) -> Acc (Result f)) -> Arguments () f -> Result f) -> f -> Plain f Source #

class Arrays (Packed a) => Argument a where Source #

Argument Z Source # | |

Arrays a => Argument (Acc a) Source # | |

Elt a => Argument (Exp a) Source # | |

(Argument a, Argument b) => Argument (a, b) Source # | |

(Unlift Exp a, Lift Exp a, Slice (Plain a), (~) * b (Exp Int)) => Argument ((:.) a b) Source # | |

(Argument a, Argument b, Argument c) => Argument (a, b, c) Source # | |