| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Tile.Tiling
Description
A tiling defines the structural decomposition of a tile. The tree layer derives communication children by contracting anchor edges.
Synopsis
- class Tiling t where
- childNodes :: t -> Tile -> [TileNode]
- data BlockPartitioning = BlockPartitioning
- newtype BoundedFanout = BoundedFanout {}
- minimumFanout :: Tile -> Int
- effectiveFanout :: Tile -> Int -> Int
- data Bisection = Bisection
- data Split = Split {}
- data Relation
- data TileNode = TileNode {}
Tiling
A recursive decomposition of an affine Tile.
A Tiling defines the structural children of a tile. Each
structural child is labelled by its relationship to the parent: an
Anchor child contains the parent root, while a Sibling child
introduces a distinct communication root.
A lawful Tiling satisfies:
- Inclusion
- Every structural child is contained in its parent.
tileRanks child `isSubsetOf` tileRanks parent
- Structural cover
- For a non-terminal parent, the structural children partition the parent ranks: their ranks are pairwise disjoint and their union is the parent.
- Progress
- Every structural child is strictly smaller than its parent.
length (tileRanks child) < length (tileRanks parent)
- Anchor preservation
- An anchor child preserves the parent root.
case relation node of
Anchor _ -> root (tile node) == root parent
_ -> True
- Sibling movement
- A sibling child has a distinct root from its parent.
case relation node of
Sibling _ -> root (tile node) /= root parent
_ -> True
Methods
childNodes :: t -> Tile -> [TileNode] Source #
Structural children of a tile, labelled by their decomposition relation. Anchor children carry the parent root; sibling children introduce a distinct communication root.
Instances
| Tiling Bisection Source # | |
Defined in Tile.Tiling | |
| Tiling BlockPartitioning Source # | |
Defined in Tile.Tiling Methods childNodes :: BlockPartitioning -> Tile -> [TileNode] Source # | |
| Tiling BoundedFanout Source # | |
Defined in Tile.Tiling Methods childNodes :: BoundedFanout -> Tile -> [TileNode] Source # | |
Built-in tilings
data BlockPartitioning Source #
Partition by fixing one coordinate at a time.
BlockPartitioning finds the first non-singleton dimension. It
creates one anchor child at index 0 and one sibling child for
each remaining index in that dimension.
Constructors
| BlockPartitioning |
Instances
| Eq BlockPartitioning Source # | |
Defined in Tile.Tiling Methods (==) :: BlockPartitioning -> BlockPartitioning -> Bool # (/=) :: BlockPartitioning -> BlockPartitioning -> Bool # | |
| Show BlockPartitioning Source # | |
Defined in Tile.Tiling Methods showsPrec :: Int -> BlockPartitioning -> ShowS # show :: BlockPartitioning -> String # showList :: [BlockPartitioning] -> ShowS # | |
| Tiling BlockPartitioning Source # | |
Defined in Tile.Tiling Methods childNodes :: BlockPartitioning -> Tile -> [TileNode] Source # | |
newtype BoundedFanout Source #
Rectangular tiling with bounded communication fan-out.
BoundedFanout computes the full local rectangular frontier of a
tile. The frontier contains, for each active dimension, the ranks
whose first coordinate away from the root occurs in that dimension.
The remaining root point is emitted as a terminal anchor.
The requested cap is respected when it is geometrically feasible:
minimumFanout tile <= fanout ==> length (children (BoundedFanout fanout) tile) <= fanout
Unconditionally:
length (children (BoundedFanout fanout) tile) <= effectiveFanout tile fanout
The tiler preserves affine rectangular children; it does not introduce jagged regions. A non-positive requested fan-out produces no children.
Constructors
| BoundedFanout | |
Instances
| Eq BoundedFanout Source # | |
Defined in Tile.Tiling Methods (==) :: BoundedFanout -> BoundedFanout -> Bool # (/=) :: BoundedFanout -> BoundedFanout -> Bool # | |
| Show BoundedFanout Source # | |
Defined in Tile.Tiling Methods showsPrec :: Int -> BoundedFanout -> ShowS # show :: BoundedFanout -> String # showList :: [BoundedFanout] -> ShowS # | |
| Tiling BoundedFanout Source # | |
Defined in Tile.Tiling Methods childNodes :: BoundedFanout -> Tile -> [TileNode] Source # | |
minimumFanout :: Tile -> Int Source #
Minimum communication fan-out required by rectangular geometry.
This is the number of active dimensions in the tile. With affine rectangular children and a corner root, each active dimension contributes one necessary frontier region away from the root.
effectiveFanout :: Tile -> Int -> Int Source #
Fan-out actually available to BoundedFanout.
The requested cap is honored when geometry permits it. If the cap is below the rectangular minimum, the geometric minimum is used instead.
Partition by bisecting one dimension at a time.
Bisection finds the first non-singleton dimension. It keeps the
lower floor(n / 2) half as the anchor and creates one sibling
from the remaining upper half.
Constructors
| Bisection |
Decomposition nodes
The affine dimension and starting index selected by a tiling step.
A Split records where a child tile came from inside its parent.
Constructors
| Split | |
Relationship between a TileNode and its parent.
Relations distinguish geometry-only anchor steps from communication steps. The tree layer contracts anchor edges; sibling edges become communication edges.
Constructors
| Root | The root of a decomposition tree. |
| Anchor Split | A child that preserves the parent root. |
| Sibling Split | A child with a distinct root from the parent. |