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

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.Internalise.AccurateSizes

Synopsis

- argShapes :: [VName] -> [FParam SOACS] -> [Type] -> InternaliseM [SubExp]
- ensureResultShape :: ErrorMsg SubExp -> [Type] -> Result -> InternaliseM Result
- ensureResultExtShape :: ErrorMsg SubExp -> [ExtType] -> Result -> InternaliseM Result
- ensureExtShape :: ErrorMsg SubExp -> ExtType -> String -> SubExp -> InternaliseM SubExp
- ensureShape :: ErrorMsg SubExp -> Type -> String -> SubExp -> InternaliseM SubExp
- ensureArgShapes :: Typed (TypeBase Shape u) => ErrorMsg SubExp -> [VName] -> [TypeBase Shape u] -> [SubExp] -> InternaliseM [SubExp]

# Documentation

argShapes :: [VName] -> [FParam SOACS] -> [Type] -> InternaliseM [SubExp] Source #

ensureResultShape :: ErrorMsg SubExp -> [Type] -> Result -> InternaliseM Result Source #

ensureResultExtShape :: ErrorMsg SubExp -> [ExtType] -> Result -> InternaliseM Result Source #

ensureExtShape :: ErrorMsg SubExp -> ExtType -> String -> SubExp -> InternaliseM SubExp Source #

ensureShape :: ErrorMsg SubExp -> Type -> String -> SubExp -> InternaliseM SubExp Source #

ensureArgShapes :: Typed (TypeBase Shape u) => ErrorMsg SubExp -> [VName] -> [TypeBase Shape u] -> [SubExp] -> InternaliseM [SubExp] Source #

Reshape the arguments to a function so that they fit the expected shape declarations. Not used to change rank of arguments. Assumes everything is otherwise type-correct.