accelerate-utility-0.0.1: Utility functions for the Accelerate framework

Safe HaskellNone



Simplify running accelerate functions with multiple curried array and expression arguments.


class C f where Source

Associated Types

type Arguments a f Source

type Result f Source

type Plain f Source


with1 :: Arrays a => ((Acc (Arguments a f) -> Acc (Result f)) -> Arguments a f -> Result f) -> (Acc a -> f) -> a -> Plain f Source


C (Acc r) 
(Argument arg, C f) => C (arg -> f) 
(Lift Acc r, Arrays (Plain r), Lift Acc s, Arrays (Plain s)) => C (r, s) 
(Lift Acc r, Arrays (Plain r), Lift Acc s, Arrays (Plain s), Lift Acc t, Arrays (Plain t)) => C (r, s, t) 

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

Associated Types

type Packed a Source

type Unpacked a Source


tunnel :: (Unpacked a -> Packed a, Acc (Packed a) -> a) Source


Argument Z 
Arrays a => Argument (Acc a) 
Elt a => Argument (Exp a) 
(Argument a, Argument b) => Argument (a, b) 
(Unlift Exp a, Lift Exp a, Slice (Plain a), (~) * b (Exp Int)) => Argument ((:.) a b) 
(Argument a, Argument b, Argument c) => Argument (a, b, c)