tile
Safe HaskellNone
LanguageGHC2024

Tile.Tiling

Description

A tiling defines the structural decomposition of a tile. The tree layer derives communication children by contracting anchor edges.

Synopsis

Tiling

class Tiling t where Source #

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

Instances details
Tiling Bisection Source # 
Instance details

Defined in Tile.Tiling

Tiling BlockPartitioning Source # 
Instance details

Defined in Tile.Tiling

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 

data Bisection Source #

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 

Instances

Instances details
Eq Bisection Source # 
Instance details

Defined in Tile.Tiling

Show Bisection Source # 
Instance details

Defined in Tile.Tiling

Tiling Bisection Source # 
Instance details

Defined in Tile.Tiling

Decomposition nodes

data Split Source #

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 

Fields

  • dim :: Int

    Dimension split by the tiling step.

  • index :: Int

    Starting index of the child along dim.

Instances

Instances details
Eq Split Source # 
Instance details

Defined in Tile.Tiling

Methods

(==) :: Split -> Split -> Bool #

(/=) :: Split -> Split -> Bool #

Ord Split Source # 
Instance details

Defined in Tile.Tiling

Methods

compare :: Split -> Split -> Ordering #

(<) :: Split -> Split -> Bool #

(<=) :: Split -> Split -> Bool #

(>) :: Split -> Split -> Bool #

(>=) :: Split -> Split -> Bool #

max :: Split -> Split -> Split #

min :: Split -> Split -> Split #

Show Split Source # 
Instance details

Defined in Tile.Tiling

Methods

showsPrec :: Int -> Split -> ShowS #

show :: Split -> String #

showList :: [Split] -> ShowS #

data Relation Source #

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.

Instances

Instances details
Eq Relation Source # 
Instance details

Defined in Tile.Tiling

Ord Relation Source # 
Instance details

Defined in Tile.Tiling

Show Relation Source # 
Instance details

Defined in Tile.Tiling

data TileNode Source #

A tile labelled with its relationship to a parent tile.

TileNode is the node type used by decomposition and hop trees. The relation field records how the node arises from its parent; the root node of a tree uses Root.

Constructors

TileNode 

Fields

Instances

Instances details
Eq TileNode Source # 
Instance details

Defined in Tile.Tiling

Show TileNode Source # 
Instance details

Defined in Tile.Tiling