| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Tile.Schedule
Description
A schedule is a list of directed send steps. This module defines the schedule representation and the primitive functions that turn tile relationships into member-to-member communication edges.
- Divergence schedule
- Edges run from root toward leaves. This is the form produced by
buildScheduleand accepted by every collective in Tile.Execution and Tile.Execution.Concurrent. - Convergence schedule
- Edges run from leaves toward root. Obtained by applying
reverseScheduleto a divergence schedule. Execution APIs derive convergence internally where needed; callers rarely need it directly.
Synopsis
- data Step a = Step {}
- type Schedule a = [Step a]
- data RoutedSchedule a = RoutedSchedule {
- ingress :: a
- routedSteps :: Schedule a
- adjacencyList :: Ord a => Schedule a -> Map a [a]
- newtype Occlusion a = Occlusion {
- isOccluded :: a -> Bool
- representative :: Eq a => Occlusion a -> [a] -> Tile -> Maybe a
- stepFor :: [a] -> Tile -> Tile -> Maybe (Step a)
- stepForOccluded :: Eq a => Occlusion a -> [a] -> Tile -> Tile -> Maybe (Step a)
- reverseStep :: Step a -> Step a
- reverseSchedule :: Schedule a -> Schedule a
Schedule representation
A directed communication step from one member to another.
data RoutedSchedule a Source #
A schedule with an explicit ingress member.
Under occlusion, the ingress may differ from the natural root of the starting tile.
Constructors
| RoutedSchedule | |
Fields
| |
Instances
| Eq a => Eq (RoutedSchedule a) Source # | |
Defined in Tile.Schedule Methods (==) :: RoutedSchedule a -> RoutedSchedule a -> Bool # (/=) :: RoutedSchedule a -> RoutedSchedule a -> Bool # | |
| Show a => Show (RoutedSchedule a) Source # | |
Defined in Tile.Schedule Methods showsPrec :: Int -> RoutedSchedule a -> ShowS # show :: RoutedSchedule a -> String # showList :: [RoutedSchedule a] -> ShowS # | |
Occlusion
A predicate describing unavailable members.
Constructors
| Occlusion | |
Fields
| |
representative :: Eq a => Occlusion a -> [a] -> Tile -> Maybe a Source #
Choose the first non-occluded member in a tile.
Step construction
stepFor :: [a] -> Tile -> Tile -> Maybe (Step a) Source #
Build a fault-free step from a parent tile to a child tile.
Returns Nothing when the two tiles have the same root, since that
would be a self-edge.
stepForOccluded :: Eq a => Occlusion a -> [a] -> Tile -> Tile -> Maybe (Step a) Source #
Build a step using live representatives for the parent and child.
Returns Nothing if either tile has no representative or if both
tiles choose the same representative.
Reversal
reverseStep :: Step a -> Step a Source #
Reverse the direction of one step, converting a divergence edge to a convergence edge or vice versa.
reverseSchedule :: Schedule a -> Schedule a Source #
Convert a divergence schedule to a convergence schedule, or vice versa, by reversing every step.