Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Reduce selected dimensions.
Alternatively you may reorder dimensions with backpermute
and fold once along multiple dimensions.
Synopsis
- data T sh0 sh1 a
- type Cubic rank0 rank1 = T (Shape rank0) (Shape rank1)
- apply :: (C array, C sh0, C sh1, C a) => T sh0 sh1 a -> array sh0 a -> array sh1 a
- passAny :: Cubic rank rank a
- pass :: (Natural rank0, Natural rank1, C a) => Cubic rank0 rank1 a -> Cubic (Succ rank0) (Succ rank1) a
- fold :: (Natural rank0, Natural rank1, C a) => (Exp a -> Exp a -> Exp a) -> Cubic rank0 rank1 a -> Cubic (Succ rank0) rank1 a
- ($:.) :: (Process proc0, Process proc1) => proc0 -> (proc0 -> proc1) -> proc1
Documentation
pass :: (Natural rank0, Natural rank1, C a) => Cubic rank0 rank1 a -> Cubic (Succ rank0) (Succ rank1) a Source #
fold :: (Natural rank0, Natural rank1, C a) => (Exp a -> Exp a -> Exp a) -> Cubic rank0 rank1 a -> Cubic (Succ rank0) rank1 a Source #
($:.) :: (Process proc0, Process proc1) => proc0 -> (proc0 -> proc1) -> proc1 infixl 3 Source #
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.