Vectorise.Var

ghc-8.0.1: The GHC API

Safe Haskell | None
Language | Haskell2010

Vectorise.Var

Description

Vectorise variables and literals.

Synopsis

- vectBndr :: Var -> VM VVar
- vectBndrNew :: Var -> FastString -> VM VVar
- vectBndrIn :: Var -> VM a -> VM (VVar, a)
- vectBndrNewIn :: Var -> FastString -> VM a -> VM (VVar, a)
- vectBndrsIn :: [Var] -> VM a -> VM ([VVar], a)
- vectVar :: Var -> VM VExpr
- vectConst :: CoreExpr -> VM VExpr

# Documentation

vectBndr :: Var -> VM VVar Source #

Vectorise a binder variable, along with its attached type.

vectBndrNew :: Var -> FastString -> VM VVar Source #

Vectorise a binder variable, along with its attached type, but give the result a new name.

vectBndrIn :: Var -> VM a -> VM (VVar, a) Source #

Vectorise a binder then run a computation with that binder in scope.

vectBndrNewIn :: Var -> FastString -> VM a -> VM (VVar, a) Source #

Vectorise a binder, give it a new name, then run a computation with that binder in scope.

vectBndrsIn :: [Var] -> VM a -> VM ([VVar], a) Source #

Vectorise some binders, then run a computation with them in scope.

vectVar :: Var -> VM VExpr Source #

Vectorise a variable, producing the vectorised and lifted versions.

vectConst :: CoreExpr -> VM VExpr Source #

Constants are lifted by replication along the integer context in the `VM` state for the number of elements in the result array.