Safe Haskell | None |
---|---|
Language | Haskell2010 |
Taking the optimized OM as the input,
The Plan
summarizes and fixes the detail of the code generation,
such as amount of memory to be allocated,
the extra subroutines which does internal calculations,
and decisions on which part of calculation each subroutines make
etc.
- data Plan v g a = Plan {
- planName :: Name
- setup :: Setup v g a
- storages :: Vector (StorageRef v g a)
- kernels :: Vector (Kernel v g a)
- subKernels :: Vector (SubKernelRef v g a)
- lowerMargin :: v g
- upperMargin :: v g
- data SubKernelRef v g a = SubKernelRef {
- subKernelParent :: Plan v g a
- kernelIdx :: Int
- omWriteGroupIdx :: Int
- inputIdxs :: Vector Node
- calcIdxs :: Vector Node
- outputIdxs :: Vector Node
- subKernelRealm :: Realm
- lowerBoundary :: v g
- upperBoundary :: v g
- data StorageRef v g a = StorageRef {
- storageRefParent :: Plan v g a
- storageIdx :: StorageIdx
- storageDynValue :: DynValue
- data StorageIdx
- class Referrer a b | a -> b where
- parent :: a -> b
- dataflow :: SubKernelRef v g a -> Graph v g a
- labNodesIn :: SubKernelRef v g a -> Vector (LNode (Node v g a))
- labNodesOut :: SubKernelRef v g a -> Vector (LNode (Node v g a))
- labNodesCalc :: SubKernelRef v g a -> Vector (LNode (Node v g a))
- storageType :: StorageRef v g a -> DynValue
Documentation
A data structure that contains all informations for code generation.
Plan | |
|
data SubKernelRef v g a Source
subroutines that executes portion of a calculations for certain kernel
SubKernelRef | |
|
Realmable (SubKernelRef v g a) Source | |
Nameable (SubKernelRef v g a) Source | |
Referrer (SubKernelRef v g a) (Plan v g a) Source |
data StorageRef v g a Source
refers to a storage required in the plan
StorageRef | |
|
Realmable (StorageRef v g a) Source | |
Nameable (StorageRef v g a) Source | |
Referrer (StorageRef v g a) (Plan v g a) Source |
data StorageIdx Source
StaticRef Int | (StatigRef plan i) = i'th static variable in the plan |
ManifestRef Int Node | (ManifestRef plan i j) = j'th node of the i'th kernel in the plan |
class Referrer a b | a -> b where Source
a data that holds referrence to the Plan it belongs to.
Referrer (StorageRef v g a) (Plan v g a) Source | |
Referrer (SubKernelRef v g a) (Plan v g a) Source |
dataflow :: SubKernelRef v g a -> Graph v g a Source
labNodesIn :: SubKernelRef v g a -> Vector (LNode (Node v g a)) Source
a list of inputs the subroutine needs.
labNodesOut :: SubKernelRef v g a -> Vector (LNode (Node v g a)) Source
a list of outputs the subroutine makes.
labNodesCalc :: SubKernelRef v g a -> Vector (LNode (Node v g a)) Source
all the caclulations performed in the subroutine.
storageType :: StorageRef v g a -> DynValue Source
get the DynValue description for a storage referrence.