Copyright | (c) Dominik Schrempf 2020 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Mon Sep 7 13:36:45 2020.
Parallel evaluation up to a given layer. By convention layer 0 only has one element: the root node. The layer 1 includes the daughter nodes of the root node, and so on.
The layer to which a node belongs should not be confused with the depth
of
a tree.
Synopsis
- parTree :: (NFData e, NFData a) => Int -> Strategy (Tree e a)
- parBranchFoldMap :: NFData f => Int -> (e -> f) -> (f -> f -> f) -> Tree e a -> f
- parBranchFoldMapWithLayer :: NFData f => Int -> (Int -> e -> f) -> (f -> f -> f) -> Tree e a -> f
- parNodeFoldMap :: NFData b => Int -> (a -> b) -> (b -> b -> b) -> Tree e a -> b
Documentation
parTree :: (NFData e, NFData a) => Int -> Strategy (Tree e a) Source #
Parallel evaluation strategy for a tree into normal form.
Evaluate the sub trees up to given layer in parallel.
parBranchFoldMap :: NFData f => Int -> (e -> f) -> (f -> f -> f) -> Tree e a -> f Source #
Map and fold over branches. Evaluate the sub trees up to given layer in parallel.