Vectorise.Builtins.Base

ghc-7.0.4: The GHC API

Vectorise.Builtins.Base

Contents

- Hard config
- Builtins
- Projections

Description

Builtin types and functions used by the vectoriser. These are all defined in the DPH package.

Synopsis

- mAX_DPH_PROD :: Int
- mAX_DPH_SUM :: Int
- mAX_DPH_COMBINE :: Int
- mAX_DPH_SCALAR_ARGS :: Int
- data Builtins = Builtins {
  - dphModules :: Modules
  - parrayTyCon :: TyCon
  - parrayDataCon :: DataCon
  - pdataTyCon :: TyCon
  - paTyCon :: TyCon
  - paDataCon :: DataCon
  - preprTyCon :: TyCon
  - prTyCon :: TyCon
  - prDataCon :: DataCon
  - replicatePDVar :: Var
  - emptyPDVar :: Var
  - packByTagPDVar :: Var
  - combinePDVars :: Array Int Var
  - scalarClass :: Class
  - closureTyCon :: TyCon
  - closureVar :: Var
  - applyVar :: Var
  - liftedClosureVar :: Var
  - liftedApplyVar :: Var
  - closureCtrFuns :: Array Int Var
  - voidTyCon :: TyCon
  - wrapTyCon :: TyCon
  - sumTyCons :: Array Int TyCon
  - voidVar :: Var
  - pvoidVar :: Var
  - fromVoidVar :: Var
  - punitVar :: Var
  - selTys :: Array Int Type
  - selReplicates :: Array Int CoreExpr
  - selPicks :: Array Int CoreExpr
  - selTagss :: Array Int CoreExpr
  - selEls :: Array (Int, Int) CoreExpr
  - scalarZips :: Array Int Var
  - liftingContext :: Var
  }
- indexBuiltin :: (Ix i, Outputable i) => String -> (Builtins -> Array i a) -> i -> Builtins -> a
- selTy :: Int -> Builtins -> Type
- selReplicate :: Int -> Builtins -> CoreExpr
- selPick :: Int -> Builtins -> CoreExpr
- selTags :: Int -> Builtins -> CoreExpr
- selElements :: Int -> Int -> Builtins -> CoreExpr
- sumTyCon :: Int -> Builtins -> TyCon
- prodTyCon :: Int -> Builtins -> TyCon
- prodDataCon :: Int -> Builtins -> DataCon
- combinePDVar :: Int -> Builtins -> Var
- scalarZip :: Int -> Builtins -> Var
- closureCtrFun :: Int -> Builtins -> Var

# Hard config

mAX_DPH_PROD :: Int

mAX_DPH_SUM :: Int

mAX_DPH_COMBINE :: Int

mAX_DPH_SCALAR_ARGS :: Int

# Builtins

data Builtins

Holds the names of the builtin types and functions used by the vectoriser.

Constructors

Builtins |
Fields dphModules :: Modules parrayTyCon :: TyCon PArray parrayDataCon :: DataCon PArray pdataTyCon :: TyCon PData paTyCon :: TyCon PA paDataCon :: DataCon PA preprTyCon :: TyCon PRepr prTyCon :: TyCon PR prDataCon :: DataCon PR replicatePDVar :: Var replicatePD emptyPDVar :: Var emptyPD packByTagPDVar :: Var packByTagPD combinePDVars :: Array Int Var combinePD scalarClass :: Class Scalar closureTyCon :: TyCon :-> closureVar :: Var closure applyVar :: Var $: liftedClosureVar :: Var liftedClosure liftedApplyVar :: Var liftedApply closureCtrFuns :: Array Int Var closure1 .. closure2 voidTyCon :: TyCon Void wrapTyCon :: TyCon Wrap sumTyCons :: Array Int TyCon Sum2 .. Sum3 voidVar :: Var void pvoidVar :: Var pvoid fromVoidVar :: Var fromVoid punitVar :: Var punit selTys :: Array Int Type Sel2 selReplicates :: Array Int CoreExpr replicate2 selPicks :: Array Int CoreExpr pick2 selTagss :: Array Int CoreExpr tagsSel2 selEls :: Array (Int, Int) CoreExpr elementsSel2_0 .. elementsSel_2_1 scalarZips :: Array Int Var map, zipWith, zipWith3 liftingContext :: Var lc

indexBuiltin

Arguments

:: (Ix i, Outputable i) |
=> String | Name of the selector we've used, for panic messages.
-> (Builtins -> Array i a) | Field selector for the `Builtins`.
-> i | Index into the array.
-> Builtins |
-> a |

Get an element from one of the arrays of contained by a `Builtins`. If the indexed thing is not in the array then panic.

# Projections

selTy :: Int -> Builtins -> Type

selReplicate :: Int -> Builtins -> CoreExpr

selPick :: Int -> Builtins -> CoreExpr

selTags :: Int -> Builtins -> CoreExpr

selElements :: Int -> Int -> Builtins -> CoreExpr

sumTyCon :: Int -> Builtins -> TyCon

prodTyCon :: Int -> Builtins -> TyCon

prodDataCon :: Int -> Builtins -> DataCon

combinePDVar :: Int -> Builtins -> Var

scalarZip :: Int -> Builtins -> Var

closureCtrFun :: Int -> Builtins -> Var