knead-0.4.1: Repa-like array processing using LLVM JIT

Safe HaskellNone




data T p sh0 sh1 Source


Process (T p sh0 sh1) 

apply :: (C sh0, C sh1, C a) => T p sh0 sh1 -> Array p sh0 a -> Array p sh1 aSource

type Linear p sh0 sh1 = T p (Shape sh0) (Shape sh1)Source

pass :: Linear p sh0 sh1 -> Linear p (sh0 :. i) (sh1 :. i)Source

pick :: (C i, Storable i) => T p i -> Linear p sh0 sh1 -> Linear p (sh0 :. i) sh1Source

extrude :: (C i, Storable i) => T p i -> Linear p sh0 sh1 -> Linear p sh0 (sh1 :. i)Source

($:.) :: (Process proc0, Process proc1) => proc0 -> (proc0 -> proc1) -> proc1Source

Use this for combining several dimension manipulators. E.g.

 apply (passAny $:. pick 3 $:. pass $:. replicate 10) array

The constraint (Process proc0, Process proc1) is a bit weak. We like to enforce that the type constructor like Slice.T is the same in proc0 and proc1, and only the parameters differ. Currently this coherence is achieved, because we only provide functions of type proc0 -> proc1 with this condition.