futhark-0.20.0: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Internalise.AccurateSizes

Synopsis

Documentation

argShapes :: (HasScope SOACS m, Monad m) => [VName] -> [FParam] -> [Type] -> m [SubExp] Source #

ensureArgShapes :: Typed (TypeBase Shape u) => ErrorMsg SubExp -> SrcLoc -> [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.