Paraiso-0.3.1.2: a code generator for partial differential equations solvers.

Safe HaskellSafe-Infered

Language.Paraiso.Generator.Plan

Description

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.

Synopsis

Documentation

data Plan v g a Source

A data structure that contains all informations for code generation.

Constructors

Plan 

Fields

planName :: Name

name of the plan

setup :: Setup v g a

OM setup, includes all static variables

storages :: Vector (StorageRef v g a)

Newly allocated Manifest variables

kernels :: Vector (Kernel v g a)

kernels

subKernels :: Vector (SubKernelRef v g a)

subkernels

lowerMargin :: v g

the total lower margin of the OM, large enough to fit all the kernels

upperMargin :: v g

the total upper margin of the OM, large enough to fit all the kernels

Instances

Nameable (Plan v g a) 
Referrer (StorageRef v g a) (Plan v g a) 
Referrer (SubKernelRef v g a) (Plan v g a) 

data SubKernelRef v g a Source

subroutines that executes portion of a calculations for certain kernel

Instances

data StorageRef v g a Source

refers to a storage required in the plan

Instances

Realmable (StorageRef v g a) 
Nameable (StorageRef v g a) 
Referrer (StorageRef v g a) (Plan v g a) 

data StorageIdx Source

Constructors

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 whereSource

a data that holds referrence to the Plan it belongs to.

Methods

parent :: a -> bSource

Instances

Referrer (StorageRef v g a) (Plan v g a) 
Referrer (SubKernelRef v g a) (Plan v g a) 

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 -> DynValueSource

get the DynValue description for a storage referrence.