futhark-0.25.27: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.IR.Mem.Interval

Synopsis

- data Interval = Interval {
  - lowerBound :: TPrimExp Int64 VName
  - numElements :: TPrimExp Int64 VName
  - stride :: TPrimExp Int64 VName
  }
- distributeOffset :: MonadFail m => SofP -> [Interval] -> m [Interval]
- expandOffset :: SofP -> [Interval] -> Maybe SofP
- intervalOverlap :: [(VName, PrimExp VName)] -> Names -> Interval -> Interval -> Bool
- selfOverlap :: scope -> asserts -> [(VName, PrimExp VName)] -> [PrimExp VName] -> [Interval] -> Maybe Interval
- primBool :: TPrimExp Bool VName -> Maybe Bool
- intervalPairs :: [Interval] -> [Interval] -> [(Interval, Interval)]
- justLeafExp :: PrimExp VName -> Maybe VName

# Documentation

data Interval Source #

Constructors

Interval |

Fields

- lowerBound :: TPrimExp Int64 VName
- numElements :: TPrimExp Int64 VName
- stride :: TPrimExp Int64 VName

#### Instances

Instances details

Show Interval Source # |
Instance details Defined in Futhark.IR.Mem.Interval Methods showsPrec :: Int -> Interval -> ShowS Source # show :: Interval -> String Source # showList :: [Interval] -> ShowS Source #
FreeIn Interval Source # |
Instance details Defined in Futhark.IR.Mem.Interval Methods freeIn' :: Interval -> FV Source #
Eq Interval Source # |
Instance details Defined in Futhark.IR.Mem.Interval Methods (==) :: Interval -> Interval -> Bool Source # (/=) :: Interval -> Interval -> Bool Source #

distributeOffset :: MonadFail m => SofP -> [Interval] -> m [Interval] Source #

expandOffset :: SofP -> [Interval] -> Maybe SofP Source #

intervalOverlap :: [(VName, PrimExp VName)] -> Names -> Interval -> Interval -> Bool Source #

selfOverlap :: scope -> asserts -> [(VName, PrimExp VName)] -> [PrimExp VName] -> [Interval] -> Maybe Interval Source #

Returns true if the intervals are self-overlapping, meaning that for a given dimension d, the stride of d is larger than the aggregate spans of the lower dimensions.

primBool :: TPrimExp Bool VName -> Maybe Bool Source #

intervalPairs :: [Interval] -> [Interval] -> [(Interval, Interval)] Source #

justLeafExp :: PrimExp VName -> Maybe VName Source #